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

/
Size2 size = get_size();
			
			if (!tabs_visible) {
				theme_cache.panel_style->draw(canvas, Rect2(0, 0, size.width, size.height));
				return;
			}
			int header_height = _get_top_margin();
			
			theme_cache.tabbar_style->draw(canvas, Rect2(0, 0, size.width, header_height));
			
			theme_cache.panel_style->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
			
			if (get_popup()) {
				int x = is_layout_rtl() ? 0 : get_size().width - theme_cache.menu_icon->get_width();
				if (menu_hovered) {
					theme_cache.menu_hl_icon->draw(get_canvas_item(), Point2(x, (header_height - theme_cache.menu_hl_icon->get_height()) / 2));
				} else {
					theme_cache.menu_icon->draw(get_canvas_item(), Point2(x, (header_height - theme_cache.menu_icon->get_height()) / 2));
				}
			}
		} break;
		case NOTIFICATION_TRANSLATION_CHANGED:
		case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
		case NOTIFICATION_THEME_CHANGED: {
			theme_changing = true;
			call_deferred(SNAME("_on_theme_changed")); 
		} break;
	}
}
void TabContainer::_on_theme_changed() {