How to create a light effect that only applies to ocean?

I would like to create some kind of light caustics that only shows within the ocean.
I’ve created a directional light that contains the water caustics effect.
I’ve set the water caustic’s dependent to the player’s location, such that if the player reaches certain height == height of the water surface, the directional light containing water caustics is disabled, or else it’s enabled.
However, setting the water caustics’ visibility depending on the player’s height is glitchy, as the directional light keeps toggling on and off if the player reaches a certain sea level, potentially causing water caustics to be visible above water level.
I’ve searched online about encapsulating the light containing water caustics into a box container, but I don’t think it’s possible in UE4.
Are there any alternative solutions, such that the water caustics cannot be seen above ocean-level? I am thinking about applying the Exponential Height Fog underwater too.