tether him to you. then work on teaching him a leave it command. To teach a leave it command, start with treats.
Use a large HIGH value treat. Keep that treat in your hand. Remember, he NEVER EVER gets this treat otherwise it will defeat the purpose to teaching a leave it because he'll learn he leaves it long enough, he'll get the treat. So you have the high value treat in one hand, closed fist!!!!! and other treats available in the free hand. Show him the high value treat, close your fist and tell him leave it. He'll try to get it, probably roughly, at first. Don't give in. When he turns his head away, praise and treat. Repeat. Start working up to a leave it with him giving eye contact to you. It's a slow process but one you HAVE to work on daily if for no other reason, a protection for your dog.
My husband is out of town this weekend but I'll see if we can try to get a video of me working with Dax on a leave it so you can have a visual of what I'm talking about. I've only worked with Dax on leave it a couple times because his focus is iffy some days but other days its spot on. He's actually pretty good about staying out of trouble.
The most important commands you can teach your dog if you teach nothing else, Come and Leave It. These are must know commands for all dogs. They're safety commands.
Shasta GSD 5/5/10 CGC, ITD, TC
"Dax" Thor z vom Weberhaus BCAT CAX2 CGCA ETD HCT NCO-1 PKD-T RATI RATN RA TC TKA 3/18/2013
"Hades" Guilty vom Blutfeuer 10/26/2018
Zena GSD 6/1/03-2/16/2016
Riley GSD/BC 1/10/05-2/1/2013