Yes and no.
It’s way easier to just split the mesh up into 2 and deal with the priority.
(Good catch on the fact I didn’t read the post though ;P)
The alternative is to change the depth at the material level.
This can be done. It’s done regularly for Grstner waves to render correctly.
It’s Pixel sorting so it is more expensive than say splitting the mesh up in 2.
You can find different solutions for how it’s done inside the Community Ocean project.
Also the water shader does it in hlsl so you could poke around the .usf and pull out a custom node made from it that will likely perform better (remains to be seen in practice).