You can try to teach him stop.
I had to do that with Bella. she loves playing with kids and will try to get out the gate to play with them. Half the time I have to have the leash on the girls so I can take them to go potty when people are out side. They listen to me when I give a firm stop but still try to do it a few time later. HOPEING I dont remember what they where trying to do