Clipping is one of the hardest things to fix in a game. It would also be hard to try and keep them from walking into each other. These are not real animals. They AI controlled models in a video game. The best way to try and limit this, cause you can't stop it, is to not put so many animals in one enclosure. Decreasing the chances you will see it happen is all you can do cause there is no stopping it.
Even when I play Red Dead Redemption 2 and Red Dead Online I see guns clip through my characters clothing. Like a rifle just disappears into my characters back or the grips of a pistol or revolver clip through the tail of my jacket or coat. It just happens.