There are three ways to deal with sour piñatas, and only one of them lasts.
You can press Y to view a sour's requirements and satisfy them, which turns it into a resident. You can hit it with your shovel until it breaks — but it will return, so this only buys time. Or you can purchase a sour tower piece from the store, which blocks them from entering your garden altogether.
The tower piece is the answer if the problem is persistent. It costs more upfront than the effort of shovelling, but it ends the interruptions for good.