Whenever I'm outside my dog, Leela, wants to come out. I want her to stay in the yard, so I use the Invisible Lead that I've learned from the Trust Technique.
You'll have to establish a solid Creative Reaction inside the house first. Then do the same in your garden. After that, drop the leash and walk away. The Invisible Lead is not to control your dog, but to increase the attention from your dog to you.
First, I ask her to sit and get present. She sits and stays there because I ask her to sit there and because of the connection we built with the Creative Reaction. I can do what I need to do in the garden while she is sitting in one spot.
Now she is happy being outside with me, and I'm happy getting the job done!
The Invisible Lead will also help your dogs (or any other animals) overcome behavior problems such as fear or aggression outside of your house.
Learn more about the Trust Technique: https://trust-technique.com/product/messages-of-trust/tt/20/