Provide a litter box. They prefer them.
Plant something stinky. Scented geraniums work here.
Buy a spray specifically for this purpose.
Lay a fine garden mesh around the plant.
There are prong mats made just for this purpose. They don't cause injuries. They just make digging impossible.
Motion activated sprinklers.