### Godot version

4.2 dev4

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

When you have many tabs opened and they are overflowing with the < > buttons, when you switch scene tab it may hide some tabs in specific circumstances:

https://github.com/godotengine/godot/assets/2223172/e5904497-6e3f-48af-815a-3a156ca15018

I'd expect that simply switching to another tab has no effect on visibility.

### Steps to reproduce

1. Open many scene tabs
2. Repeat what I did on the video
May depend on tab names and window size.

### Minimal reproduction project

N/A
#ifndef EDITOR_SCENE_TABS_H
#define EDITOR_SCENE_TABS_H
#include "scene/gui/margin_container.h"
class Button;
class HBoxContainer;
class Panel;
class PanelContainer;
class PopupMenu;
class TabBar;