Same with me. It working at 2019.2 but when I upgrade to 2019.4 LTS then it can’t assign. I don’t know it is a feature or not =))
To work around this.
After the scene is loaded then execute this.
canvasCamera.transform.SetParent(null);
SceneManager.MoveGameObjectToScene(canvasCamera.gameObject, SceneManager.GetActiveScene());
canvasCamera.worldCamera = Camera;
canvasCamera.transform.SetParent(transform); //move back to don't destroy root or using don'tdestroyonload object