Why does the canvas image, go, show up as soon as I press Mouse1?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Scope : MonoBehaviour
{

public Animation scope;
public GameObject go;

// Use this for initialization
void Start()
{
   scope = gameObject.GetComponent<Animation>();

    
    go.SetActive(false);
}

// Update is called once per frame
void Update()
{
    foreach (AnimationState state in scope)
    {
        
       

        if (Input.GetMouseButtonDown(1))
        {
            
            state.speed = 2;
            scope.Play();
        }

        if (Input.GetMouseButtonUp(1))
        {
            state.speed = -2;
        }

       if (Input.GetMouseButtonUp(1) && state.time == 0f)
        {
            state.speed = -2;
            state.time = 0.49f;
            scope.Play();
        }

        if (Input.GetMouseButton(1) && state.time == 0f)
        {
            go.SetActive(true);
        }
        else
        {
            go.SetActive(false);

        }
    }

}

}

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Scope : MonoBehaviour
{

public Animation scope;
public GameObject go;

// Use this for initialization
void Start()
{
   scope = gameObject.GetComponent<Animation>();

    
    go.SetActive(false);
}

// Update is called once per frame
void Update()
{
    foreach (AnimationState state in scope)
    {
        
       

        if (Input.GetMouseButtonDown(1))
        {
            
            state.speed = 2;
            scope.Play();
        }

        if (Input.GetMouseButtonUp(1))
        {
            
            state.speed = -2;
        }

       if (Input.GetMouseButtonUp(1) && state.time == 0f)
        {
            go.SetActive(false);
            state.speed = -2;
            state.time = 0.49f;
            scope.Play();
        }

        if (Input.GetMouseButton(1) && state.time == 0f)
        {
            StartCoroutine("OnScoped");
        }
        if (Input.GetMouseButton(1) && state.time != 0f)
        {
            go.SetActive(false);
        }
       
    }

}

IEnumerator OnScoped()
{
    yield return new WaitForEndOfFrame();
    go.SetActive(true);
}

}