Menu problem

Why the animation buttons do not work after I press the play button on the game scene and in the pause menu, press to go to the main menu. And after these actions, animations do not work in the main menu.

Pas: 12345

I am thinking it does not work anymore because it deletes itself after you change the scene. You might wanna try using a Singleton also seeing your GameObjects for both scenes would be helpful.

Singleton example I use in my game:

void Awake()
    {
        int gameStatusCount = FindObjectsOfType<ExampleMenu>().Length; 
        if (gameStatusCount > 1)
        {
            gameObject.SetActive(false);
            Destroy(gameObject);
        }
        else
        {
            DontDestroyOnLoad(gameObject);
        }
    }

Put this in your menu GameObject and switch ExampleMenu with the name of the Object.