Is this a bug for LineRenderer when calling multiple drawing?

Hello guys,I am trying to make an rts demo and use linerenderer to draw ant lines like this.
linerenderer0
it looks fine and the line works under the correct sorting-layer I’ve set.
However when I select more than one unit, the line just become thicker than what it suppose to be and the sorting-layer also change by accidence.
It’s so weird isn’t it?


Here is the multi drawing
image


And this is even more weird, when I call the draw separately it just become normal, does anyone have an idea what happend?
linerenderer2


Here is where I call the draw in a controller of the tank, I draw this line in a Coroutine, update startpoint and endpoint every frame.

IEnumerator UpdateAntLine(Vector3 targetLocation, bool ifAttack)
{
    int i = 0;
    while (true)
    {
        if (ifAttack)
        {
            if (!ReferenceEquals(enemy.GetComponent<UnitController>(), null))
            {
                antLineController.CreateLine(transform.position, enemy.transform.position);
                antLineController.LineRenderer.material.SetTextureOffset("_Texture0",new Vector2(i*(-0.03f),0));
                if (i >= 300)
                {
                    antLineController.SetVisible(false);
                    yield break;
                }

                i++;
            }
            else
            {
                yield break;
            }
        }
        else
        {
            antLineController.CreateLine(transform.position, targetLocation);
            antLineController.LineRenderer.material.SetTextureOffset("_Texture0",new Vector2(i*-(0.03f),0));
            if (i >= 300)
            {
                antLineController.SetVisible(false);
                yield break;
            }

            i++;
        }

        yield return null;
    }
}

And here are the methods refered.

public void SetVisible(bool ifVisible)
{
    lineRenderer.enabled = ifVisible;
}

public void CreateLine(Vector3 startPoint, Vector3 endPoint)
{
    lineRenderer.positionCount = 2;
    lineRenderer.SetPosition(0,startPoint);
    lineRenderer.SetPosition(1,endPoint);
}