When mine dug up a load of just-planted beetroot seedlings I stuck a load of sticks poking out of the soil and she didn’t do it again. Next door did the same with the flowerbeds in their front garden that she was probably shitting in but I can’t vouch for the effectiveness in that case.
Like this but with twigs/bits of bamboo instead of ugly plastic forks