=/ Yeah, but the point isn't to farm their precious meat and leather, it's for them to make me fertilizer. I suppose I'll try double-thick walls but I cant think of any way to stop them from despawning....Sounds like some age old vanilla bugs there. I gather domestic animals tend to wander into walls, suffocating themselves to death and occasionally glitching through.
Double layered walls seem to help, and crowding should be avoided.
Though frankly you're probably better off just producing a soul shard or some such and being done with the matter.