Back when I had open compost piles, I had problems with animals taking food from it, too. In fact, I had a dog who loved
to eat the materials from the pile, even after they were no longer recognizable. She would even eat finished
compost when I spread it around my plants.
It was because of her that I finally moved my compost to bins made of 2" x 4" welded wire. She'd even stand beside them and 'graze' through the wire, so I eventually made bins of 1/2" x 1" welded wire to keep her out.
That particular dog would eat anything
, though. She even once ate a glass thermometer ... and yes, it was an old one, that contained mercury. I had to call the Poison Control Center so many times about that poor beast!