### 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
int depth = -1;
		int blocked = 0; 
		StringName name;
		SceneTree *tree = nullptr;
		bool inside_tree = false;
		bool ready_notified = false; 
		bool ready_first = true;
#ifdef TOOLS_ENABLED
		NodePath import_path; 
#endif
		String editor_description;
		Viewport *viewport = nullptr;
		HashMap<StringName, GroupData> grouped;
		List<Node *>::Element *OW = nullptr; 
		List<Node *> owned;
		ProcessMode process_mode = PROCESS_MODE_INHERIT;
		Node *process_owner = nullptr;
		ProcessThreadGroup process_thread_group = PROCESS_THREAD_GROUP_INHERIT;
		Node *process_thread_group_owner = nullptr;
		int process_thread_group_order = 0;
		BitField<ProcessThreadMessages> process_thread_messages;
		void *process_group = nullptr; 
		int multiplayer_authority = 1; 
		Variant rpc_config;
		
		
		bool physics_process = false;
		bool process = false;
		int process_priority = 0;
		int physics_process_priority = 0;