### Godot version

v4.2.dev3.official [013e8e3af]

### System information

Windows 10, 64bit

### Issue description

![image](https://github.com/godotengine/godot/assets/35988767/ccdac68c-a60d-491b-a406-d6e3bc1c95ae)
![GIF](https://github.com/godotengine/godot/assets/35988767/7d230faf-0260-4bc3-92e8-11cd026931a8)


### Steps to reproduce

/

### Minimal reproduction project

/
set_tab_disabled(get_tab_count() - 1, tab_disabled);
				set_tab_metadata(get_tab_count() - 1, tab_metadata);
				move_child(moving_tabc, get_tab_control(hover_now)->get_index(false));
				if (!is_tab_disabled(hover_now)) {
					set_current_tab(hover_now);
				}
			}
		}
	}
}
void TabContainer::_on_tab_clicked(int p_tab) {
	emit_signal(SNAME("tab_clicked"), p_tab);
}
void TabContainer::_on_tab_hovered(int p_tab) {
	emit_signal(SNAME("tab_hovered"), p_tab);
}
void TabContainer::_on_tab_changed(int p_tab) {
	call_deferred(SNAME("_repaint"));
	emit_signal(SNAME("tab_changed"), p_tab);
}
void TabContainer::_on_tab_selected(int p_tab) {
	if (p_tab != get_previous_tab()) {
		call_deferred(SNAME("_repaint"));
	}
	emit_signal(SNAME("tab_selected"), p_tab);
}
void TabContainer::_on_tab_button_pressed(int p_tab) {
	emit_signal(SNAME("tab_button_pressed"), p_tab);
}
void TabContainer::_refresh_tab_names() {