Hey there!
I lived on a farm out in the country for a long while, and we also hosted many unplanned 'critters compost cabaret.'
There are a couple ways we went about addressing it, with varying results. Depends on how much effort you want to put in.
1) Grab a shovel
Take a shovel out with you, and BURY fresh scraps under the rest of the heap, instead of piling them on top or mixing into the surface.
It adds quite a bit of effort to each instance of composting, so my family got tired of it eventually.
2) Build a structure to hold the compost in
If you don't want to build something out of wood, there's also stakes and
chicken wire, or stacked
hay bales to create a composting 'box.' The straw/hay will additionally keep the pile insulated & decompose faster. After a year or two, the straw/hay can be mixed into the compost itself, and replaced.
Having an open-top structure won't really prevent critters from getting in, but I've found it usually stops them from EXPLODING the pile everywhere. They might drag a scrap or three out, but that's easy to toss back in.
3) Cover the top
Grab some chickenwire or other small-hole metal fencing and 'sew' (with wire, string, or zip ties) panels together until you have a wire blanket big enough to lay over the pile. You'll need to lift a side of the 'blanket' every time you need to add more biomass, but it
should solve the critter issue neatly.