There is a hole at the bottom of the fence, a worn track along it, or a gap behind the shed. Last week your dog was out on the pavement and a neighbour brought them back.
This is not the same as digging
A dog digging for entertainment digs where the soil is nicest, in the middle of the lawn, and stays with the hole. A dog escaping digs at the line, points the hole outward, and abandons it the moment it works.
Fence-running is the same behaviour without the soil. So is squeezing through a panel, or shouldering a gate that lifts. All of it is one problem, and the problem is the boundary.
Why the fence line is a threshold
Everything your dog wants is on the other side. A cat, the dog next door, children, the road, the world. The fence is the last thing between them and a payoff that is enormous, and one success buys weeks of trying.
Close the ground line first
Walk the boundary at your dog's height, in daylight, and find the working spots. Flattened grass, a worn track, soil sprayed inward, a panel that flexes, a gate with a 6 inch gap under it.
Lay paving slabs or a treated ground board along the dug sections, flat against the fence, so there is nothing soft to start on.
Peg wire mesh flat on the ground along the line and let the grass grow through it. Nothing sharp goes on top of the fence.
Block the view along the stretch your dog patrols. Solid panels or reed screening turn a moving target into a dull wall.
Until it holds, your dog does not go out there alone. Every trip is with you, on a leash if the line is winning.
Nothing that could injure your dog goes on the boundary. No barbed wire, no spikes, no buried electric fence and no remote collar. A review of aversive training methods found them associated with worse welfare outcomes and no training advantage. Reward-based methods are what the veterinary behaviour guidance recommends instead.
Then train the turn away from the line
Take your dog to 10 feet from the boundary on a leash. Say their name once, turn, walk 10 feet inward, and feed 3 times.
Run 6 reps, twice a day, when there is nothing exciting on the other side. You are building the turn before you need it.
Pay every unprompted look away from the fence with food, with no cue at all. Looking back at you is the behaviour you want to be worth something.
Once the turn is easy, run it while next door's dog is out. Stay as far back as your dog needs to keep taking food.
Give the middle of the garden the better job
Scatter half your dog's dinner in the grass, away from the fence, and let them find it. Ten unhurried minutes of nose-down searching costs you nothing.
Cut garden trips to 5 minutes with you out there, and come back in together, rather than half an hour alone.
Fill the walk properly with sniffing time. A dog who has had 40 minutes of that has less reason to go looking for their own outing.
Behaviour change is built from management plus reinforcement together. The closed line is the management and the paid turn is the reinforcement, and neither one holds on its own. Around the onset of adolescence, dogs also respond less to the cues of the person who raised them. Calling your dog off the line is at its weakest right now.
Safety note
A dog loose at large is a road risk, and this is the part that is not a training problem. Stop unsupervised garden access today, check the microchip details and the collar tag, and tell your veterinary practice if your dog has already been out. Get help now if your dog panics when left in the garden, has injured themselves on the fence, or has been in a road incident. That means a veterinarian and a qualified behaviour professional. Sudden behaviour change warrants a veterinary examination, and pain frequently presents as a change in behaviour rather than as obvious lameness.
Today's version, in one line: slab or board the dug section tonight, and no unsupervised garden until the line holds.