Ui element doesnt work like it should

Hello guys, i need some help please!

So in my game i have a you lose panel, that apears when you die, in editor everything is fine, but in the apk when the game start, the panel already start active, and the button restart doesnt work, so i really dont know whats happening, im going to post my code above so you guys can help me.

public class GameManager : MonoBehaviour


{
    public GameObject[] uiElementos;
    public GameObject container1;
    //SpawnJason



 
    //
    public static GameManager instance;
    public bool gameOver;
    //[SerializeField]
    private GameObject youLosePanel;
    //[SerializeField]
    private Button denovo;


    public bool jogoComecou;

    //public GameObject[] uiElementos;
    //public GameObject container1;

 
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(this.gameObject);

        }
        else
        {
            Destroy(gameObject);
        }
       
        SceneManager.sceneLoaded += Carrega;



    }
    #region Carrega
    void Carrega(Scene cena, LoadSceneMode modo)
    {
       
        container1 = GameObject.FindWithTag("UI");
        youLosePanel = container1.transform.GetChild(2).gameObject;
        denovo = container1.transform.GetChild(2).GetChild(0).GetComponent<Button>();

        //RestartLvl();
        denovo.onClick.AddListener(Jogarnovamente);


        RestartLvl();




    }
    #endregion


    // Start is called before the first frame update
    void Start()
    {
        gameOver = false;
        RestartLvl();
     
    }

    // Update is called once per frame
    void Update()
    {


        if (Input.GetKey(KeyCode.R))
        {
            Jogarnovamente();
        }

        if (gameOver && !youLosePanel.activeSelf) {
      


                FimdeJogo();
           
        }
     

    }

   
    void Jogarnovamente()
    {
      
        SceneManager.LoadScene(1);
       
      
    }

    void RestartLvl()
    {
       
        gameOver = false;
        StartCoroutine(tempo());
       
        //youLosePanel.SetActive(false);

    }

        IEnumerator tempo()
    {
        yield return new WaitForSeconds(0.001f);
        youLosePanel.SetActive(false);
    }

    void FimdeJogo()
    {
       

        youLosePanel.gameObject.SetActive(true);

    }

    private void OnDestroy()
    {
      
        SceneManager.sceneLoaded -= Carrega;
    }

Add debug.log to your methods and see what is triggering. Also, look for a runtime console. The one we use at work is called log viewer and is free on the asset store. You can also look at logcat to make sure you aren’t getting any errors.

I would also suggest that instead of checking for gameOver in update like that, you simply trigger the youlose panel(call FimdeJogo) when conditions are met (players lives are 0, health is 0, etc) instead of continued checking in Update.

brother i really apriciated your tip about log viewer, this will help me a lot, i still couldnt solve the error, but this is a huge step, thanks my man