|Since there is no magic formula for instant maturity, there can be real problems with a middle manager who belongs in middle school.|
Some managers think that by saying they are kidding, they have a wild card that allows them to insult, interrupt, and annoy others. When your manager plays this card, he is not playing around. People engage in these types of behaviors to intimidate, dominate, and control others.
The fact that he knows you don't like it may even be energizing for him. Your reaction tells him that his juvenile games are working. Therefore, you need to change your strategy.
The next time he starts this nonsense with you, use a calm and businesslike mode and tell him that his actions are upsetting you and interfering with your work, and you want him to stop right now. If he does not get the message, then you should deliver it to his manager or to your company's human resources manager if there is one.
Your manager is mismanaging, misbehaving, and misinformed, and the longer you wait to act assertively, the worse his kidding is going to get. No kidding.