You let your dog out for 5 minutes and they are gone. A 12 month old dog with long legs can clear a 4 foot fence, climb one, or find the gap behind the shed.
A safety problem before it is a training problem
Until the garden holds, your dog does not go out there without you and a leash. That is not for ever. It is what stops the next 2 weeks adding practice to a habit that already works.
Make the garden hold, this weekend
Walk the boundary and find the launch point. There is nearly always one: a low panel, a slope, a bin, a compost heap, a log pile.
Move whatever your dog climbs on. Bins, chairs, planters and logs go 5 feet away from the fence line.
Raise the low section with trellis, or angle the top of it inward. An inward overhang beats extra height, because most dogs climb rather than clear.
Close the ground-level gaps at the same time. Plenty of dogs jump one week and dig under the next.
Nothing that could injure your dog goes on the boundary. No wire along the top, no spikes, and no buried electric fence.
Then work out why they are leaving
Something to chase on the other side, such as cats, chickens or children. Block the view along that stretch with solid panels or reed screening.
Something to reach, such as a dog next door. Talk to your neighbour about keeping the two of them apart at the same times each day.
Nothing to do. A dog left alone in a garden for an hour finds a project, and the fence is the most interesting one on offer.
Being out there alone. Most escapes happen when nobody is watching, in the same 10 minutes of the day.
Give the garden a better job
Scatter half your dog's dinner in the grass and let them find it. Ten minutes of nose-down searching costs you nothing.
Cut garden time to 5 minutes at a stretch, with you out there, and come back in together.
Practise a paid recall in the garden, 6 reps, twice a day. Call, feed 3 pieces, then release your dog back to sniffing.
Fill the walk properly. A dog who has had 40 minutes of sniffing elsewhere has less reason to go looking over the fence.
Behaviour change is built from management plus reinforcement. The raised fence is the management and the paid recall is the reinforcement, and neither one works alone.
You will be told a buried electric fence or a remote collar settles this in a day. A review of aversive training methods found them associated with worse welfare outcomes and no training advantage.
Safety note
Speak to your veterinary practice if this started suddenly, or if your dog seems agitated rather than curious. Sudden behaviour change warrants a veterinary check. Get help now if your dog panics when left in the garden, or has injured themselves on the fence. That means a veterinarian and a qualified behaviour professional.
How long this takes
The boundary work is a weekend. The habit takes longer, because escaping has already paid several times. Expect to keep the fence raised permanently, and to keep the garden supervised through the rest of adolescence.
This weekend's version, in one line: find the launch point, move what they climb on, and no unsupervised garden until it holds.