Allay don't find their way in water properly, if they have a block above their head, they will get stuck and drown.
1.19-pre3:
Use the water potion on the allay.
Noticed that allays have difficulty moving in water.
In the 1.20 snapshot it becomes more serious:
Before drowning injuries, they hardly move in the water and sometimes even spin in the water.
After drowning injuries, they escape at an abnormally slow rate.
I can confirm this behavior.