Stop Monobehaviour updates during LoadScene?

This is sort of a style question about some behavior that seems a little bit odd when I’m transitioning to a new scene. Specifically, this happens when the player dies and chooses to return to the main menu.

One note, the start menu is it’s own scene, the in game pause/end menus are just prefabs Canvases with TimeScale=0;

Here’s some pseudo code:

    LevelManager
    {
            if (playerHealth <= 0 && !displayingMenu)
                    {
                        PauseAndDisplayMenu(); //sets Time.TimeScale=0;
                    }
    }
    MenuButtonHandler
    {
        public void QuitToMainMenu()
        {
             OtherCleanup();
             Time.TimeScale=1;
             SceneManager.LoadScene(sceneNum);
        }
    }

This seems all well and good, except after LoadScene is called all of the update functions from the current scene are still running while the scene is loading. This gives LevelManager just enough time to run it’s player health check again and set TimeScale back to 0.

Is this intended behaviour from MonoBehavior? It seems weird to continue to run update code in the transition between scenes. I could just stop this one script from running easily, but this could be a problem elsewhere too i.e. where globals or statics are set(not that I use them much), but the objects might be in a weird state.

I could also just stop any updates from running with monobehvior.enabled if I understand correctly and then re-enable it later. Or, I could try to move the unpause later, but I’m betting I’ll have a hard time getting it in the right spot.

Is there any other way to stop these final few update calls? In my mind, if I’m calling loadScene in single mode everything should really stop, since that’s the queue to change scenes, but maybe I’m thinking about it wrong.

hi;
u can change this by create a simple bool ;

like :
public bool IsPlayerDead = false;

so u make it true when player die;

then in update method in the first lane u dont let it to check any thing if its true like this:

void Update()
{

if ( IsPlayerDead == true)
{
return;
}
}

then when game is starting again u can make it false again;