There is a bug with Holdout mode when using "Defer all shading". It should work properly if you disable this in the render settings. When you disable deferred shading it will shade each micropolygon of the water individually, as opposed to using the adaptive sampler to shade pixels/subpixels. Bear in mind that this could affect render times and/or image quality, but if necessary you can usually compensate for quality differences by changing the micropoly detail.
If you want a solution where you don't change "Defer all shading", you could put a Constant Shader at the end of the terrain/surface shaders, with colour and alpha set to 0.