Just a bit disrespectful. I agree with the below posts. Chase him off or give him a good smack and move him over. If you can move the horse's feet, you're in control. If the horse moves your feet, he's in control. That's how a herd works.
Perhaps try this . Attach a long lead to him. When he goes to lean on you drop his foot and chase him away or lunge him. Bring him in and try again. It won't take him long to learn that leaning makes him more work than standing still .!
I'll try it but i normally smack him on his shoulder and tell him to knock it off. He'll stop for a couple of mintues, then continues.
I would carry a whip, whenever he goes to lean I would just give a pop on his shoulder/neck chest etc