The Bug:
If you trade with a villager and then quickly exit the world, the villager will not level up upon reentering the world.
Steps to Reproduce:
Spawn a villager, place an employment block
Trade with them enough to level them up
Immediately exit the world after closing the menu, before they emit magenta particles or their badge changes color
Reload the world and take note of how the villager will stay in a full XP bar state but not level up.
Observed Behavior:
Villagers don't level up.
Expected Behavior:
Villagers would level up.
can confirm in 1.19 creative