Static function not working in between screen

I’m coding my RPG battle system so for that I created a scriptable object called enemy.

I created a function battle to load my battle scene along with the enemy object:

public static void Battle(Enemy enemy){
        SceneManager.LoadScene(1);
        GameObject.FindWithTag("Enemy").GetComponent<EnemyObject>().enemy = enemy;
}

NOTE: I already made GameManager Don’t destroy on load so that it remains on the scene.
Now the scene is loading all right but I encountered a null reference exception.

I called Battle(toxopus); after a conservation of the character.
My project is 2D but that’s not a problem.
The error says that there’s no enemy object so I believe it does the finding before switching scenes. Any suggestions?

@Gamingdude1 Hi, try this (not tested)

public static void Battle(Enemy enemy)
    {
        if (!enemy) { Debug.Log("Stop Battle!! Enemy is Null"); return; }
        SceneManager.LoadScene(1);
        FindEnemy(enemy);
    }

    static void FindEnemy(Enemy enemyCurrent)
    {
        GameObject enemyTarget = null;

        while (enemyTarget == null)
        {
            enemyTarget  = GameObject.FindWithTag("Enemy");
            //just in case
            if (enemyTarget) break;
        }

        EnemyObject enemyObject = enemyTarget.GetComponent<EnemyObject>();

        if (!enemyObject) { Debug.Log("EnemyObject not found!!"); return; }

        enemyObject.enemy = enemyCurrent;

        Debug.Log("Found Enemy!!");
        
    }

I FIXED that!
I created 2 static variables static bool searching; static Enemy currentEnemy;

public static void Battle(Enemy enemy)
    {
        if (enemy == null) { Debug.Log("Stop Battle!! Enemy is Null"); return; }
        SceneManager.LoadScene(1);
        currentEnemy = enemy;
        searching = true;
    }

Along with this I added some code to update. The answer by @sath was correct but due to some reason it didn’t worked without update.

private void Update()
    {
        if (Input.GetKeyDown(KeyCode.F4)) ChangeResolution();
        if(searching)
        {
            do
            {
                Debug.Log("LOADING");
            } while (SceneManager.GetActiveScene().buildIndex != 1);

            GameObject.FindGameObjectWithTag("Enemy").GetComponent<EnemyObject>().enemy = currentEnemy;
            searching = false;
        }
    }

Thanks to everyone who tried helping.