I have 4 Barns.
In two of them, all is good.
In the other two I am losing cows. It didn’t happen right away, I had them for a few years, then one of them went from 9 to 3 the next time I checked it. Over the next couple of year it worked back up to around 6 I believe, then this year It and the other one were down to 2 cows in each one down from 6 and the other down from 9.
Side note: the 2 that have no problems are side by side. The two with the disappearances are 10 to 15 tiles away (maybe 20) side by side.