This happened to me yesterday. I'd been spending a few hours working in my castle base, not contiuously as I'd been logging in and out a bit over the evening. The base is at my spawn and I'd been within a couple of hundred blocks of the mobs the entire time. There were a couple of things to note:
The cats and dogs that were made to sit and the llama in a minecart did NOT despawn. Everything else did.
The villagers that despawned were all below Y=64. The ones higher up all made it.
This happened to me yesterday. I'd been spending a few hours working in my castle base, not contiuously as I'd been logging in and out a bit over the evening. The base is at my spawn and I'd been within a couple of hundred blocks of the mobs the entire time. There were a couple of things to note:
The cats and dogs that were made to sit and the llama in a minecart did NOT despawn. Everything else did.
The villagers that despawned were all below Y=64. The ones higher up all made it.