SceneManager.LoadSceneAsync stops coroutine

I am writing a script that controls a door trigger. When OnTriggerEnter is called, a coroutine is started to set some variables and switch the scene with SceneManager.LoadSceneAsync. When the scene is done loading, it becomes active, however the rest of the coroutine does not finish. It just immediately ends. I am not sure if this is the way the method is supposed to act, or if I am doing something wrong. If it is the way the method works, what should I do instead to get the result I want?

This is the code that is having problems:

        public IEnumerator FadeToScene(int scene, Vector2 startLoc)
        {
            PlayerController player = PlayerController.thePlayer;
            CameraFX cam = player.GetComponentInChildren();
            player.canMove = false;
            player.rb.velocity *= 0;
            yield return StartCoroutine(cam.fadeTo(Color.black, .25F));
            Time.timeScale = 0;

` `         //Everything up until this point works. Below is where problems start
            AsyncOperation load = SceneManager.LoadSceneAsync(scene);
            load.allowSceneActivation = true;
            while (!load.isDone)
            {
                yield return null;
            }

            //Everything below is skipped
            player.rb.position = startLoc;
            Time.timeScale = 1;
            yield return StartCoroutine(cam.unFade(.25F));
            player.canMove = true;
        }

The code is in a script that is not destroyed between scenes. I have also tried moving the async load to a separate coroutine. After the scene is finished loading, the method returns to the line where it was called from, and the rest of the lines are skipped.

I am guessing that this is on purpose and I am unaware, but I am not sure.

Coroutines just die quiet deaths on scene changes, doesnt help if they are called out of DontDestroy objects.

Sorry for the necro.
I finally figured this out, and could not find the answer anywhere online. Posting for others.

Your AsyncOperation load is being set to null.
For some reason unity does not report this as a null reference error in the logger, it just quits the coroutine quietly.

Do this;
while (load != null && !load.isDone)
{
yield return null;
}

When the scene is loaded the script is destroyed you need to make it to not get destroyed during scene change.

public class ExampleClass : MonoBehaviour {
    void Awake() {
        DontDestroyOnLoad(transform.gameObject);
    }
}