While marketed as a dog and cat repellent, Get Off My Garden is also effective against foxes.
Get Off My Garden repellent crystals are jelly like and best handled with gloves. They are a dark greenish color and contain strong smelling methly, nonyl and ketone. Avoid contact with stemmed plants and grasses where they may lead to discolouration. The container can cover 20 to 40 sq. metres depending on how fruggle you are in spreading them.
We found these crystals were still effective after rain and lasted 2 to 4 weeks before another application was necessary. Because of the dark green colouration they are probably more suited to your flower beds than on lawns.
These crystals work but of course you would need to buy more every month so also consider water repellers and ultrasonic options which only have a one-off cost.