keep out v.s. shut out


I have an impression that “shut out” and “keep out” have the same meaning “not allow to come in/enter”
Could you confirm or disprove it, please?
Also, could you tell me if the following sentences are natural to you?

Thanks !

Those are more or less the same. Just know that “shut out” evokes a mental image of a closed door or gate – whether a real one or a metaphorical one. “Keep out” elicits no such image.

Also note that there’s an intransitive usage of “keep out”:

“I keep out of his office, because he’s always crabby.”
“The dog just keeps out of our neighbor’s yard. We didn’t have to train him.”
“I want you to keep out of the refrigerator. Dinner will be ready soon.”

In this intransitive usage, “shut out” is impossible.

I see. Thank you very much !