Need help changing some water code

Hello,

I have a beautiful water shader code that I want to use in my game.
Unfortunately, I need to adapt it. The problem is the following:
I want to have the texture mapping to global coordinates and use a node to fade out the borders of the water plane.
The coded water however overrides the global texture coordinates and ignores the nodes.
In my example file in layer two I have a water plane that I made, which illustrates the effect I want to achieve. If the player moves (press W) it gives the ilusion as if the player is moving endlessly on water but in reality the plane is parented to the player. Also in layer two you can see the fading out with the node setup.

In layer 1 you see the nice looking water shader which however overrides the global texture mapping and my node setup.

Could someone help me to change the code or do whatever to achieve the same effects as the water plane in layer 2?

It would be of so much help!

Thanks a lot in advance.

Greetings

NeedHelp.blend (2.0 MB)

Btw. it was done in UPBGE 2.5.0