### 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
void print_tree();
	void print_tree_pretty();
	void set_scene_file_path(const String &p_scene_file_path);
	String get_scene_file_path() const;
	void set_editor_description(const String &p_editor_description);
	String get_editor_description() const;
	void set_editable_instance(Node *p_node, bool p_editable);
	bool is_editable_instance(const Node *p_node) const;
	Node *get_deepest_editable_node(Node *p_start_node) const;
#ifdef TOOLS_ENABLED
	void set_property_pinned(const String &p_property, bool p_pinned);
	bool is_property_pinned(const StringName &p_property) const;
	virtual StringName get_property_store_alias(const StringName &p_property) const;
	bool is_part_of_edited_scene() const;
#endif
	void get_storable_properties(HashSet<StringName> &r_storable_properties) const;
	virtual String to_string() override;
	
	void propagate_notification(int p_notification);
	void propagate_call(const StringName &p_method, const Array &p_args = Array(), const bool p_parent_first = false);
	
	void set_physics_process(bool p_process);
	double get_physics_process_delta_time() const;
	bool is_physics_processing() const;
	void set_process(bool p_process);
	double get_process_delta_time() const;
	bool is_processing() const;
	void set_physics_process_internal(bool p_process_internal);
	bool is_physics_processing_internal() const;
	void set_process_internal(bool p_process_internal);