### Godot version

v4.0.beta12.mono.official [3c9bf4bc2]

### System information

Windows 10

### Issue description

When using GetTree().ChangeScene (or GetTree().ReloadCurrentScene), the orphan node count in Monitors goes up by the number of nodes in the target scene.

This effect is amplified when running a scene that has lots of nodes.


I've also tested this in the previous beta (v4.0.beta11.mono.official [91713ced8]) and confirmed the issue didn't exist there.

### Steps to reproduce

1. Run the included Minimal Reproduction Project.
2. Open the Debugger/Monitors tab.
3. Press "Space" to load Scene2.tcsn (2 Nodes).
 - Orphan nodes increases by 2.
5. Press "Space" to load Scene1.tcsn (3 Nodes).
 - Orphan nodes increases by 3.

### Minimal reproduction project

[MRP.zip](https://github.com/godotengine/godot/files/10415860/MRP.zip)

HashMap<StringName, Group>::Iterator E = group_map.find(p_group);
	if (E) {
		E->value.changed = true;
	}
}
void SceneTree::flush_transform_notifications() {
	SelfList<Node> *n = xform_change_list.first();
	while (n) {
		Node *node = n->self();
		SelfList<Node> *nx = n->next();
		xform_change_list.remove(n);
		n = nx;
		node->notification(NOTIFICATION_TRANSFORM_CHANGED);
	}
}
void SceneTree::_flush_ugc() {
	ugc_locked = true;
	while (unique_group_calls.size()) {
		HashMap<UGCall, Vector<Variant>, UGCall>::Iterator E = unique_group_calls.begin();
		const Variant **argptrs = (const Variant **)alloca(E->value.size() * sizeof(Variant *));
		for (int i = 0; i < E->value.size(); i++) {
			argptrs[i] = &E->value[i];
		}
		call_group_flagsp(GROUP_CALL_DEFAULT, E->key.group, E->key.call, argptrs, E->value.size());
		unique_group_calls.remove(E);
	}
	ugc_locked = false;
}
void SceneTree::_update_group_order(Group &g, bool p_use_priority) {