Still in 1.20.40.21... This has bothered me so much while playing survival and seems like such an easy fix.
This issue was fully solved in 1.20.40.21, with the sound now playing depending on where the player's head is relative to water.
As the behavior on Bedrock Edition seems to be working as intended now, there is a possible related issue on Java Edition where the sound plays consistently when entering water but not exiting.
Still here in 1.21's full release.