I have a small garden and I ran in a similar problem, but with cats that were taking my raised beds as their personal toiled... And is crazy when I go to gather some aromatic plants, to end up with all the bad smells. I solved it with a device from Lidl, which was about 15 EUR... and it works well for over a year, although it's a little annoying when wind is moving and triggers it all the time.
This is the one that I bought:
RE: No Weapons To Fight