Mobs Can't Pathfind Over Floating Slabs Or Beds
I was building an iron farm on survival but than I noticed the villagers on the floating beds just sat there, day and night not sleeping. so I did some testing and found out mobs won't walk over floating slabs or beds.