Preserving a scene while loading anather scene using ui button

hello, i am working on a vr projcet in which the main camera is in one scene. i made a ui element in which button changes the scene. my porblem is that while loading, it destory/ unload the main camera scene and give the error " no camera to render" can any one help me with that

use this method on camera:

void Awake() 
{
        DontDestroyOnLoad(transform.gameObject);
}