I don't know the answer but I'd like to start with some theory crafting to come closer to an answer.
Terrain types
wc3-file-formats/specs/w3e at main · Luashine/wc3-file-formats - "Water" is a separate terrain flag. This probably implies "deep water"
Pathing
I think the correct file was war3mapPath.tga or war3map.wpm
The colors have reserved meaning for walkability/flyability/buildability/blight. There's no "swimability" flag.
Unit movement types
Movement - Type (Movement Type)
Defines the type of movement the unit/building/hero is to have. Movement type affects things such as the ability to move over particular terrain, and what spells the unit/building/hero can be subject to. It also affects which Unit Editor fields have an effect on the unit/building/hero.
I don't have access to WE right now, so
looking at code (arrived at through SetUnitPathing) will have to do:
JASS:
constant pathingtype PATHING_TYPE_ANY = ConvertPathingType(0)
constant pathingtype PATHING_TYPE_WALKABILITY = ConvertPathingType(1)
constant pathingtype PATHING_TYPE_FLYABILITY = ConvertPathingType(2)
constant pathingtype PATHING_TYPE_BUILDABILITY = ConvertPathingType(3)
constant pathingtype PATHING_TYPE_PEONHARVESTPATHING = ConvertPathingType(4)
constant pathingtype PATHING_TYPE_BLIGHTPATHING = ConvertPathingType(5)
constant pathingtype PATHING_TYPE_FLOATABILITY = ConvertPathingType(6)
constant pathingtype PATHING_TYPE_AMPHIBIOUSPATHING = ConvertPathingType(7)
Walkability, but nothing about swimming. Either floatability or amphibiouspathing
Putting the puzzle pieces together
If neither "floatability or amphibiouspathing" helps, then it's probably because the abilities, the movement and their pathing are only controlled deep inside game's code. Water movement is not a "first class citizen" judging by the features above, maybe it was added late on into the game. So the support is limited only to what was required by game designers at the time.
I know the submerge ability only works in deep water already, how does it detect that?
Like many abilities, they have custom logic. Maybe it's possible to detect the triggering (disengagement) of Submerge and move the unit to nearby deep water tile? Another option as someone else suggested is to drain life/mana when moving across wrong tiles.
Why it's bad to push the boundaries of something unintended by the base game:
[General] - Pathing Issue: Returning Resources over deep water
Something like this is useful to read to get an idea:
[JASS] - How to check for deep and shallow water ?
Going the opposite direction can help too:
Adding new movement types. "Is it possible to add new movement types in the Object Editor (like an anti-float movement type that prevents going in any water)?"
What else to try? Custom path maps and pathing blockers to manually separate deep from shallow water:
Pathing - Everything about it
Edit, PS: I am not a map maker. All this info was created through search of existing topics, reading and the correct working approach. If this post answers your question, I believe you could've arrived here yourself
Though I doubt it's exactly an easy "don't allow shallow water" solution as we wanted.