If a villager is treading and bouncing in water and you select to trade with them, at some point in the bouncing the trade window exits out. It typically will exit quickly, though sometimes it might not happen for a few seconds
Reproduce:
Push a villager into water that forces them to swim (or just find one bouncing in water).
Select the Villager to open the trade window
Do nothing more, just wait
Expected: Like previous versions, once you select a villager to trade with, the trade window is available until you choose to exit, barring nothing horrible happens to the villager whilst trading (e.g. on fire, killed by a zombie, falls from a high place, etc.).
Actual: Trade window exits when villager is bouncing in water.
I am unable to reproduce this issue in 20w51a. I was able to trade with a villager, whilst it was in water without any problems.