When trying to execute as entities in water the execute if command detects water as air, meaning entities in water do nothing and when executing as entities in air all entities in water are affected as well.
To replicate simply throw an item in water and try to run an execute command that detects if the entity is in water, ie:
/execute as @e[type=item] if block ~ ~ ~ minecraft:water run say hello
Nothing will happen, but if you run the execute command detecting for air the item in the water will respond, ie:
/execute as @e[type=item] if block ~ ~ ~ minecraft:air run say hello
Without using
at
orpositioned
, the position of the command is not being changed from wherever it's running (from chat, that would be you).