You burry the fence a few feet into the soil, and put up an electric fence on the top of fence. The burred piece makes it harder to dig on. On or 2 light shocks
and they stop.
And if your dog is a jumper, put a top on it using cyclone fencing or chicken wire.
If your fence is already up, burying it will not be an option. We have two Yorkshire Terriers who are diggers. We put an electric fence at ground level.
Ruta graveolens plants, citrus rinds, alcohol soaked cotton balls, marigolds planted en masse, rosemary and lavender plants can also repel unwanted animals. For stronger effect, spray the perimeter with cayenne pepper in a little water with a few drops of liquid soap, for sticking power. Chili powders, garlic, etc. also work.
If you install a fence, note that it will need to be at least 6' above ground, and at least 12-18" below ground to repel "diggers". Avoid using bonemeal as a fertilizer, which apparently attracts dogs.