Hi, im trying to make a distortion effect like But i have these problems at the edge of the screen. I attached also the shader graph and the properties
Yep, that's unavoidable. There's a reason that tutorial video never shows the distortion object close to the edge of the screen, because the same issue would be visible. You're taking the image that's already been rendered and distorting it. If you distort the image so that you're trying to "see" something that's not already on screen, you'll see what you're seeing as there's nothing in the render texture you're sampling from beyond what was already visible. Unity defaults the opaque texture used by the Scene Color node to use the Clamp wrap mode which repeats the edge color outside of the 0.0 to 1.0 range of the UVs. The possible "solutions" are: Do nothing and live with the weird stretched image near the edges. Use less distortion so the artifact is less obvious. Scale down the distortion when close to the edge of the screen. Scale the Screen UVs before modifying them so it's zoomed in by the max distortion amount.
For those who find this in the future, this is the aforementioned solution inside the shader graph editor (where UvScale is a vector2' Its values range between 0 - 1; 0.95 is like the value you want)