### Godot version

v4.2.dev (221884e6b)

### System information

Godot v4.2.dev (221884e6b) - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti Laptop GPU (NVIDIA; 31.0.15.3699) - 12th Gen Intel(R) Core(TM) i7-12700H (20 Threads)

### Issue description

When you are switching between open scenes the animation toolbar above the viewport can appear out of context. One example is having an animation player in a 3D scene (there is no animation toolbar in the 3D viewport), then switching to a 2D scene. The toolbar would be visible and the bottom panel would be expanded, despite no animation player or active animation being present in the second scene. Toggling the bottom panel fixes the state.

### Steps to reproduce


https://github.com/godotengine/godot/assets/11782833/f60cef64-1abc-4908-91ef-a8d12204383c



### Minimal reproduction project

N/a
Transform2D xform = transform * control->get_global_transform_with_canvas();
	if (tool == TOOL_SELECT && show_helpers && !Object::cast_to<Container>(control->get_parent())) {
		// Draw the helpers
		Color color_base = Color(0.8, 0.8, 0.8, 0.5);
		// Compute the anchors
		real_t anchors_values[4];
		anchors_values[0] = control->get_anchor(SIDE_LEFT);
		anchors_values[1] = control->get_anchor(SIDE_TOP);
		anchors_values[2] = control->get_anchor(SIDE_RIGHT);
		anchors_values[3] = control->get_anchor(SIDE_BOTTOM);
		Vector2 anchors[4];
		Vector2 anchors_pos[4];
		for (int i = 0; i < 4; i++) {
			anchors[i] = Vector2((i % 2 == 0) ? anchors_values[i] : anchors_values[(i + 1) % 4], (i % 2 == 1) ? anchors_values[i] : anchors_values[(i + 1) % 4]);
			anchors_pos[i] = xform.xform(_anchor_to_position(control, anchors[i]));
		}
		// Get which anchor is dragged
		int dragged_anchor = -1;
		switch (drag_type) {
			case DRAG_ANCHOR_ALL:
			case DRAG_ANCHOR_TOP_LEFT:
				dragged_anchor = 0;
				break;
			case DRAG_ANCHOR_TOP_RIGHT:
				dragged_anchor = 1;
				break;
			case DRAG_ANCHOR_BOTTOM_RIGHT:
				dragged_anchor = 2;