Villagers will attempt to walk on top of flowerpots when there's a roof two blocks above and they won't stop or find a new path. This behavior has been present since at least 1.13.2 (dunno why I can't select anything else other than current version).
Attached are 3 videos showing this behavior:
-Video 1: Villager panics and gets stuck on the side of the flowerpot, after killing the zombie they just jump repeatedly. Villager goes to sleep after breaking the block above.
-Video 2: Gave the villager a point of interest (workstation) and cleared a different path to no avail, still had to break block above him.
-Video 3: After killing the zombie the villager is punched to show they'll continue to attempt to climb the flowerpot after being knocked back.
How this problem can intervene raids:
While testing raids on a random desert village, by the end of the final wave I noticed there were no fireworks because all the villagers found their way to the side of flowerpots in one of the meeting point structures. This means starting a raid in a village that contains flowerpots leaves them very vulnerable if they get stuck as they won't be able to run away from raid party mobs.