Java 16, MC 1.17.1 (JE), operating system:Windows 10
When mob is walk around, they will be avoiding to drop in the holes . When there are a circle of trap doors around the first level of the hole, mobs will drop in.
The way to make this bug appear:
1.Create a new, creative-gamemode world.
2.Dig a hole in the size of at least 2*2*2.
3.Put wood trap doors around the first level of the hole, if you cannot understand, look at the photo.
4.Use spawn egg to spawn some mobs around the hole(They mustn't be attracked by you), and wait.
The mobs falls in.
MC-50556 Mobs walk off open wooden and iron trapdoors or get trapped in them because they think they are closed