### Godot version

543750a1b3f5696f9ba8e91cb49dc7db05d2ae62 

### Issue description

Looking into the cause of the `Children name does not match parent name in hashtable, this is a bug.` from #77845 and making notes in this issue before I forget what I wanted to report (again).

https://github.com/godotengine/godot/blob/543750a1b3f5696f9ba8e91cb49dc7db05d2ae62/scene/main/node.cpp#L1432-L1440

During `NOTIFICATION_CHILD_ORDER_CHANGED` the child node had been removed from the parents list of children, the child still has the parent set, making it possible to attempt to remove it from its parent again triggering the error.

### Steps to reproduce

Add this script to any node and run

```gdscript
extends Node

var node : Node

func _ready():
	var n = Node.new()
	add_child(n)
	node = n
	remove_child(n)

func _notification(what):
	if what == NOTIFICATION_CHILD_ORDER_CHANGED && node && node.get_parent() == self:
		remove_child(node)
```

### Minimal reproduction project

[Test_77870.zip](https://github.com/godotengine/godot/files/11651877/Test_77870.zip)

}
	if (!get_scene_file_path().is_empty()) { //an instance
		node->set_scene_file_path(get_scene_file_path());
		node->data.editable_instance = data.editable_instance;
	}
	StringName script_property_name = CoreStringNames::get_singleton()->_script;
	List<const Node *> hidden_roots;
	List<const Node *> node_tree;
	node_tree.push_front(this);
	if (instantiated) {
		// Since nodes in the instantiated hierarchy won't be duplicated explicitly, we need to make an inventory
		// of all the nodes in the tree of the instantiated scene in order to transfer the values of the properties
		Vector<const Node *> instance_roots;
		instance_roots.push_back(this);
		for (List<const Node *>::Element *N = node_tree.front(); N; N = N->next()) {
			for (int i = 0; i < N->get()->get_child_count(); ++i) {
				Node *descendant = N->get()->get_child(i);
				// Skip nodes not really belonging to the instantiated hierarchy; they'll be processed normally later
				// but remember non-instantiated nodes that are hidden below instantiated ones
				if (!instance_roots.has(descendant->get_owner())) {
					if (descendant->get_parent() && descendant->get_parent() != this && descendant->data.owner != descendant->get_parent()) {
						hidden_roots.push_back(descendant);
					}
					continue;
				}
				node_tree.push_back(descendant);
				if (!descendant->get_scene_file_path().is_empty() && instance_roots.has(descendant->get_owner())) {
					instance_roots.push_back(descendant);
				}
			}