The bug
If you will go to the end, start to trade with villager and then teleport through an end gateway, window won't close. So, you can trade and, after you'll go back, there will be experience, but villager's trades won't be closed.
Attachments
Comments 2
This ticket may be a duplicate of MC-50614. If not a duplicate, then definitely related. 🙂
Can confirm this behavior. Also tested with end portals and nether portals, and it's only end gateways that work for this. Along with that, I tested other block entities and entity UI's to see if they had the same effect, and none had the same effect as the villager.