I have read many tutorial and they use mask to do it, but I believe that there must be some kind of layer mode somewhere.
Anybody have idea? I found G’MIC Blend [average all] to do similar things but the subject fade.
The cleanest result is likely done using a mask. You might be able to semi-automate mask creation (that is, generate a quick garbage mask around your subject then use a difference mode of some sort to create the finer mask).
Your example is a good illustration of the complexity. If you used only a layer mode or difference you’d probably find a ton of artifacts leftover from the moving water/waves.
Still, this could be something scripted I suppose.
Could we have sample images with which to experiment?
Generate an image of bakcground
Generate mask of high contrast with background less new image
And afterwards join the pictures.
I will try to take multiple shot and shared it here, hopefully not too long.