I have to edit what I wrote earlier. It seems I wasn't thinking properly, as it does seem to work differently than I thought. Check this tgd; water level at zero seems constant across the globe. And using the height in a surface shader works well as well, as long as you don't check 'use Y for altitude'. Because the Y does differ and is taken from a kind of flat plane balancing on 0/0/0.
If using a distribution shader 'altitude in texture/terrain' takes the Y, so 'final position' is the proper one to use for shore lines, as this takes the height at that moment in the line of shaders.
It may be that adding more displacements will change the height taken in the surface shaders, so that in a more complicated setup, a distribution shader should be the best to use for exact heights in shore situations, as this computes the 'final' height.
I'm sure there are others who can explain this better.