It appears I have new information compared too that post, so I've left a comment on it.
I am playing on a vanilla Java 1.16.5 server. All 16 of my villagers (and an iron golem) disappeared. They were all in the same room as Aimee said. However, in my case all of the beds are permanently marked as occupied even during daytime.
Update: the two armadillos haven't despawned since confining them specifically within one chunk which probably proves it's a chunk border issue. The frog did though, which is probably due to the jumping. Not sure if he was exceeding an upper or lower chunk border somehow. My son said it looked like it disappeared into the floor and died somehow.