Animals have repeatedly been escaping from fenced enclosures since the 1.8 update. I can personally watch them do it. They get very close to the fence where part of their body is sticking out of the fence, and then suddenly they glitch and disappear and reappear outside of the fenced area. This bug is reproducible under a number of scenarios.
Related issues
Comments

Dupe of MC-10 / MC-2025