I'm having similar issues. I built an underground village and when I expanded it to a second level, the villagers started having major issues pathfinding. They ignore the staircases leading down and instead stand on a block directly above their bed (which is 5 blocks down on the floor below) and after a few seconds show the angry particles and release the bed
Same here. I found the entire raid in a sealed cave below the village. In the end I followed the iron golem to where it was standing staring down at the floor and dug straight down (I'm a rebel!) to find them.
Similar thing happens if you "cook" fish by trading raw fish and emerald for cooked fish from fisherman villager. The cooked fish you receive look the same, but won't stack with any that I cooked in a furnace