When villagers see a POI outside the world border, they will try to pathfind towards it (regardless of whether they could get to it) and interact with it if possible, allowing villagers to sleep outside the world border. When a villager rings a bell outside the world border, the bell will spasm constantly as long as it stays outside the world border. Villagers won't ever see the world border as an obstruction when they notice, pathfind towards, and interact with a POI.
Related issues
relates to
Attachments
Comments

Relates to MC-147122

Please do not mark unreleased versions as affected.
You don't have access to them yet.
Can confirm in 21w06a.
Can confirm in 1.16.5 and 21w08b.
Can confirm in 1.18.1.