A custom Unlit (Transparent)Shader is giving black edges on the top with a 2D sprite renderer ?

I am really new to shader programming . I was playing around with a custom unlit transparent shader to create some effects for my object which has a 2D sprite renderer attached to it . But the issue is , when ever i manipulate the uv/ texcoords The sprite gets clamped from the top and a black portion is visible however, this is not happening for the bottom portion , Same happens to the left but not with right . (When i looked in to it i kinda felt like the texture thats used by the material maybe a clamped one sinces its comes directly from Sprite renderer )
P.S : i am working to create a simple wavery effect on the 2D objects
here’s my code for the fragment shader :-

         fixed4 frag (v2f i) : SV_Target
         {
             fixed4 col = tex2D(_MainTex, float2(i.texcoord.x,i.texcoord.y+sin(i.vertex.x/20+_Time[1]/2)/50));
          UNITY_APPLY_FOG(i.fogCoord, col);
           //col.r = sin(_Time[1]/20);
             return col;
         }

Also,I would also like to add effects to UI elements with shader, what shader should I use?

Try setting the wrap mode of the sprite to “Clamp”.
You can also clamp the Y uv position with saturate.

try:
fixed4 col = tex2D(_MainTex, float2(i.texcoord.x,saturate( i.texcoord.y+sin(i.vertex.x/20+_Time[1]/2)/50)));