To see the bug,you should follow steps below:
First,create a world which is able to cheat.
Second,open it and set the game mode to spectator.
Third,move forward(press "W",default) and press down (not press sustainably) "ctrl" to speed up and fly into or out from water.
After you repeat the steps,you will find that your speed reduce when you in or out from water.
It is tested that the versions influenced include 1.19.2、23w51b.I guess the bug has influenced more past versions.