Here's what I experienced:
Ever since the animals started to walk around, I built some fences on my farm to prevent them from mixing with other animals. Sometimes when I return to my farm after some time, some of my chickens are outside of their enclosure (see the red encricled chicken on my screenshot). I believe that they are moving through the ending piles of the fences, the ones in which you can place the next fences in order to connect them (see green encirclings). Is there anything I can do to prevent this from happening?