### Godot version

v4.1.rc1.official [1f9e540f1]

### System information

Windows 10

### Issue description

Attempting to reorder the children of a TabContainer results in an unintended ordering and incorrect undo states.

Also happens in v4.0.3.stable.official [5222a99f5].

https://github.com/godotengine/godot/assets/3820082/2c2458e3-88ad-46d9-8a04-f289a049984a



### Steps to reproduce

1. Add a new TabContainer
2. Add a few children to it
3. Drag and drop to erroneously reorder them
4. Attempt to undo the change

### Minimal reproduction project

N/A
List<PropertyInfo> properties;
	p_base->get_property_list(&properties);
	for (const PropertyInfo &E : properties) {
		if (!(E.usage & (PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR))) {
			continue;
		}
		String propertyname = E.name;
		Variant old_variant = p_base->get(propertyname);
		Variant updated_variant = old_variant;
		if (_check_node_path_recursive(p_base, updated_variant, p_renames)) {
			EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
			undo_redo->add_do_property(p_base, propertyname, updated_variant);
			undo_redo->add_undo_property(p_base, propertyname, old_variant);
			p_base->set(propertyname, updated_variant);
		}
	}
	bool autorename_animation_tracks = bool(EDITOR_GET("editors/animation/autorename_animation_tracks"));
	if (autorename_animation_tracks && Object::cast_to<AnimationPlayer>(p_base)) {
		AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_base);
		List<StringName> anims;
		ap->get_animation_list(&anims);
		Node *root = ap->get_node(ap->get_root());
		if (root) {
			HashMap<Node *, NodePath>::Iterator found_root_path = p_renames->find(root);
			NodePath new_root_path = found_root_path ? found_root_path->value : root->get_path();
			if (!new_root_path.is_empty()) { 
				for (const StringName &E : anims) {
					Ref<Animation> anim = ap->get_animation(E);
					if (!r_rem_anims->has(anim)) {
						r_rem_anims->insert(anim, HashSet<int>());