Why do animals always get stuck in fence corners?

This tends to happen with chickens, pigs, cows, wolves. Are there any blocks I can use to prevent that? They even won't move if I show them food.

enter image description here


Solution 1:

I believe it is because you can stand right next to a fence, and be in both blocks. Technically, being in a block prevents you from moving, so I THINK it's just a glitch.

If I'm right, mobs get stuck in the block, like if they glitched into any other block. I think they haven't patched it because it would prevent players and mobs from standing right next to the fence. It would act like a whole block, and that stops it being like an actual fence.