I had created a GameObject to access all scripts and I was accessing all scripts through the script inside this object. Like;
AccessScripts.playerController.someVariable = "test value";
Everything was ok. But today, when I tried to change the gameOver value in PlayerController, I saw that the inside of my PlayerController script did not change. But when I did AccessScripts.playerController.gameOver (in my another script), I could see that the value there had changed. I solved this problem by accessing directly from within the current script I am using instead of AccessScripts. But I think this is a bug and it needs to be resolved.
My AccessScripts;
[HideInInspector] public static PlayerController playerController;
playerController = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>();
Edit:
This is my mistake. Thanks