Whether it's a dog or a wild animal, digging can be problematic and lead to unsightly looking landscapes; but there are solutions for homeowners that do not want to deal with the unkempt look.
Solution #1: Trenching fence.
Wildlife, such as rabbits, tend to bury themselves underneath a fence to reach crops; but by trenching yard fencing in the ground, this blocks their attempts to gain passage. This attempt is more work than using ground stakes (below); but will still get the job done to prevent garden damage from small critters. For best results, it is recommended that a fence is trenched into the ground at least 6 inches. While this attempt can see a reduction of bunnies in yards, it will be hard to chase away groundhogs, as they continuously build tunnel systems.
Solution #2: Ground stakes
Staking down fence is an easy way to prevent digging animals from getting in and out of yards. For wildlife, fence stakes block nosy deer and the like from reaching agriculture from sliding underneath fence; and for domestic animals, it keeps dogs from sneaking out, too. There are two types of ground stakes: Kinked and Rebar; and the type chosen will depend upon soil type. If soil is smooth, consider using Kinked Ground Stakes; and if soil is rocky, clay or hard, then choose Rebar Ground Stakes.