I believe this will help...
If you have ever watched a farm, you will notice that the passive mob(non lethal mobs) tend to be able to glitch into the fence posts, they do this in and out of servers. All animals do this, Cows, Pigs, Sheep, and Chickens, even if you put a roof on it and raise the fence posts 10 high, they will still glitch out.
There is a way to fix this though, what you should do is keep the fence posts(If you want) But lower the ground level about 2-3 blocks so that when the animals jump, they do not touch the fence post and do not glitch out.
Basically, have 2 or 3 rows of Solid Blocks where the animals will stand on, and then have the Farm look by adding Fence Posts on top of the solid blocks.
Hope this helps!!
~Teh~