My son who is 2 years and 7 months old has gotten into a habit of telling everyone to "go away". A most recent example happened just this morning. I sleep in another room while he and his little sister (~4 months) co-sleep w/ my wife in another bedroom. In the morning, he called for me on the Apple Watch, and I showed up - but the first thing he said to me was "go away Papa" and he even hit me, even though he called me to come himself.
This happens when his Grandma and Grandpa come to babysit almost every weekday and happens a lot with my wife lately.
This morning, I gently took him out of the bed and told him that it's very rude to say things like that to people and eventually he apologized and said that "he won't be rude to Papa anymore", but we do this every time he says it and it doesn't seem to prevent the behavior.
A little about us: I work on weekdays and usually home at night to help put kids to bed. We spend time together all weekends long. Wife works in the afternoon, and my parents come to babysit for the time my wife is gone and I am not home from work yet.
Any idea as to what the cause might be and what is the best way to respond to this behavior?