As you can see in the pictures below there's a house that spawned next to a cliff. Villagers sometimes get in correctly but sometimes they dont and go up the path next to it. When they do, they get on the roof and jump off it and they take fall demage which makes them run around and go up there again and do the same thing, over and over. i tried placing a fence there, then the baby villagers started doing it and then they get stuck in the fences (jumping when they're right next to the fence). Also villagers that go in non-full blocks they jump thinking its a full block (trapdoors placed on sides, bottom; doors; fences; walls; etc.).