### 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)

n->_call_unhandled_key_input(p_input);
				break;
		}
	}
	for (const ObjectID &id : no_context_node_ids) {
		if (p_viewport->is_input_handled()) {
			break;
		}
		Node *n = Object::cast_to<Node>(ObjectDB::get_instance(id));
		if (n) {
			n->_call_shortcut_input(p_input);
		}
	}
	call_lock--;
	if (call_lock == 0) {
		call_skip.clear();
	}
}
void SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
	r_error.error = Callable::CallError::CALL_OK;
	ERR_FAIL_COND(p_argcount < 3);
	ERR_FAIL_COND(!p_args[0]->is_num());
	ERR_FAIL_COND(p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING);
	ERR_FAIL_COND(p_args[2]->get_type() != Variant::STRING_NAME && p_args[2]->get_type() != Variant::STRING);
	int flags = *p_args[0];
	StringName group = *p_args[1];
	StringName method = *p_args[2];
	call_group_flagsp(flags, group, method, p_args + 3, p_argcount - 3);
}
void SceneTree::_call_group(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {