keep reference of these game objects between scenes without using prefabs?

when using prefabs in the game object slots I do not get a null error but it doesn’t keep track of it properly if I let the script find the game object it works but when I switch scenes I get a null reference.`
this script is on a game manager that doesn’t get destroyed between scenes

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class doorPanel : MonoBehaviour
{
   public GameObject doorPanel_0;
    public GameObject doorPanel_1;
    public bool unlocked, unlocked1;
    public bool locked, locked1;
     


    void Start()
    {
         


     
    }

    // Update is called once per frame
    void Update()
    {
          if (doorPanel_0 == null)
      {
         doorPanel_0 = GameObject.Find("Doorpanel_0");
      }

      if (doorPanel_1 == null)
      {
         doorPanel_1 = GameObject.Find("Doorpanel_1");
      }




         DoorClosed door0 = doorPanel_0.GetComponent<DoorClosed>();
        DoorClosed door1 = doorPanel_1.GetComponent<DoorClosed>(); 


          if (door0.doorclosed == true)
        {
    

            
              locked = true ;
              unlocked = false;
             


        }
        if (door0.doorclosed == false)
        {

            locked = false;
            unlocked = true;
        }


   
      

    }
}

GameObjects (and all scene objects) exists only in their own scene, not anywhere else. Also the reference to these objects are non-presistent because they need to be instantiated again when ever the scene is loaded (or reloaded). Basically they will have new memory addresses and the previous reference to them will not work (that’s why you get null reference error).

So only way you can address them in a persistent way is to find them somehow when the scene is loaded.

Now there are multiple ways to do it. The best way (in my opinion) is to use scriptable objects. Introduction to Scriptable Objects - Unity Learn

https://answers.unity.com/questions/1875967/finding-objects-on-scene-change.html?childToView=1875980#answer-1875980

This way you can, in addition to have the reference “persistent”, also store the object state and other “item properties” like door closed state.