My lineRenderer is offset when using ScreenToWorldPoint with mouse position in Unity2D

Hello I am very new to unity and C# as a whole. I am making an angry birds copy to learn how to use the program and some basic C#, while working on the sling I encountered a problem where the sling was offset. Here is an image + my script.
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.Assertions.Must;
using UnityEngine.UIElements;

public class Slingshot : MonoBehaviour
{

public bool ifPressed;
private float maxDragDistance = 1.2f;
private bool done;

private Rigidbody2D rb;
private SpringJoint2D sj;
private Rigidbody2D slingRb;

private float releaseDelay;

public LineRenderer[] lineRenderers;
public Transform[] stripPos;
public Transform idlePos;

private void Start()
{
    rb = GetComponent<Rigidbody2D>();
    sj= GetComponent<SpringJoint2D>();
    slingRb = sj.connectedBody;
    rb.bodyType = RigidbodyType2D.Kinematic;

    releaseDelay = 1 / (sj.frequency * 4);
    sj.distance = 0;
    sj.frequency = 0;
    done = false;
    rb.position = slingRb.position;

    lineRenderers[0].positionCount = 2;
    lineRenderers[1].positionCount = 2;
    lineRenderers[0].SetPosition(0, stripPos[0].localPosition);
    lineRenderers[1].SetPosition(0, stripPos[1].localPosition);
}

private void DragBall()
{
    Vector2 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition) ;
    float distance = Vector2.Distance(mousePosition, slingRb.position);
    if (distance > maxDragDistance)
    {
        Vector2 direction = (mousePosition - slingRb.position).normalized;
        rb.position = slingRb.position + (direction * maxDragDistance);
        setStrips(slingRb.position + (direction * maxDragDistance));
    }
    else
    {
        rb.position = mousePosition;
        setStrips(mousePosition);
    }

}

void resetStrips()
{
    setStrips(idlePos.localPosition);
}
void setStrips(Vector3 position)
{
    lineRenderers[0].SetPosition(1, position);
    lineRenderers[1].SetPosition(1, position);
}

private void OnMouseDown()
{
    if (!done) 
    {
        ifPressed = true;
        rb.bodyType = RigidbodyType2D.Kinematic;
        sj.frequency = 7;
        lineRenderers[0].enabled = true;
        lineRenderers[1].enabled = true;
    }
}

private void OnMouseUp()
{
    ifPressed = false;
    rb.bodyType = RigidbodyType2D.Dynamic;
    StartCoroutine(Release());
    done= true;
}

void Update()
{

    if(ifPressed)
    {
        DragBall();
    }
    else
    {
        resetStrips();
    }

}

private IEnumerator Release()
{
    yield return new WaitForSeconds(releaseDelay);
    sj.enabled = false;
}

}