ChangeSceneToPacked from Engine.GetMainLoop is returning Ok but not changing the scene

Godot Version

Godot v4.2.2.stable.mono


Hello, I am trying to change the active scene from outside of scene-controlled code through the following:

	public static void ToMainMenu()
		if (Engine.GetMainLoop() is SceneTree sceneTree)
					ResourceLoader.Load<PackedScene>("res://Interface/MainMenu/MainMenu.tscn")) == Error.Ok,
				"Failed to switch to main menu", true);
			Assert.IsTrue(false, "Cannot exit to main menu - active main loop is not SceneTree.", true);

ChangeSceneToPacked is returning Error.Ok, but in reality all I get is a grey background, the scene is not actually loading properly, the game doesn’t crash or anything, it just kinda idles.

Any ideas?

From some further testing it seems that while the engine is not crashing, it is in fact hanging completely, I added the following when the game initializes:

		Task.Run((() =>
			while (true)
				Log.Debug((Engine.GetMainLoop() as SceneTree).CurrentScene.Name);

Which abruptly stops when attempting to switch back to MainMenu: