How can I continue the game without losing values after Game Over?

Hello How can I continue the game without losing values after Game Over? Let’s say Game Over happened and my Player object disappeared from the scene and the player will be able to continue the game by watching an ad. How can I continue the game without losing values ​​such as gold and score? I save my values with playerPrefs. I write this but all values are zero. I guess these games also have an update because new scene has been uploaded.

 public void watchRewardedAdResumeGame(object sender, Reward args)
     {
         SceneManager.LoadScene("Level");

         PlayerPrefs.SetInt("Gold",PlayerPrefs.GetInt("Gold") + goldResume);
         goldResume=PlayerPrefs.GetInt("Gold");           
         goldText.text="Gold: " + goldResume;

         PlayerPrefs.SetFloat("score",PlayerPrefs.GetFloat("score") + scoreResume);
         scoreResume=PlayerPrefs.GetFloat("score");
         scoreText.text=((int)scoreResume).ToString();
     }

Are you using a different scene for GameOver. If so, then you should not use it and instead you should create a UI Canvas and then an empty gameobject named “game over” and under that gameobject you can parent all your buttons, images and gameover text etc. After that you can simply enable and disable the gameobject so that it only appears when player has lost or simply gameover. In this way you will not have to switch scenes and will also save you time.

public GameObject gameOverMenu; // Creating a gameObject
private bool isGameOver;
if(isGameOver = true)
gameOverMenu.SetActive(true); // if you want to enable the object
Time.timeScale = 0; // Just so that your game gets paused and make sure to make it 1 after you want your gameOverMenu To be disabled

else if(isGameOver = false)
gameOverMenu.SetActive(false); // if you want to disable the object
Time.timeScale = 1; // basically resuming the game so that it is no longer a time freeze