unity – How to use an overlapping shader so that it uses layers sort from sprite renderer and its transparent

Im using the shader from question

, but once I put it in the game, and my character gets close to it, it will be hidden by the shadow of the tree:

enter image description here

Any way to make the shader transparent and/or maybe use the sprite renderer sort layer system

I have been trying to use stencil configurable shader with no luck
Thank you for your help

Not sure what combination of these should work:
enter image description here

The character is using a normal sprite renderer.