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

ERR_FAIL_COND_MSG(data.inside_tree && !Thread::is_main_thread(), "Removing children from a node inside the SceneTree is only allowed from the main thread. Use call_deferred(\"remove_child\",node).");
	ERR_FAIL_NULL(p_child);
	ERR_FAIL_COND_MSG(data.blocked > 0, "Parent node is busy adding/removing children, `remove_child()` can't be called at this time. Consider using `remove_child.call_deferred(child)` instead.");
	ERR_FAIL_COND(p_child->data.parent != this);
	/**
	 *  Do not change the data.internal_children*cache counters here.
	 *  Because if nodes are re-added, the indices can remain
	 *  greater-than-everything indices and children added remain
	 *  properly ordered.
	 *
	 *  All children indices and counters will be updated next time the
	 *  cache is re-generated.
	 */
	data.blocked++;
	p_child->_set_tree(nullptr);
	
	remove_child_notify(p_child);
	p_child->notification(NOTIFICATION_UNPARENTED);
	data.blocked--;
	data.children_cache_dirty = true;
	bool success = data.children.erase(p_child->data.name);
	ERR_FAIL_COND_MSG(!success, "Children name does not match parent name in hashtable, this is a bug.");
	notification(NOTIFICATION_CHILD_ORDER_CHANGED);
	emit_signal(SNAME("child_order_changed"));
	p_child->data.parent = nullptr;
	p_child->data.index = -1;
	if (data.inside_tree) {
		p_child->_propagate_after_exit_tree();
	}
}