### Godot version

4.0beta10

### System information

macOS 13.0.1

### Issue description

If you expand a shader resource in the inspector panel this automatically opens the Shader Editor tab in the bottom panel. However, there seems to be a bug with the Animation tab that somehow triggers this again when the animation tab is opened (maybe it refreshes the inspector?), resulting in the Shader Editor immediately being opened again. So, if you have a shader resource expended in the inspector you can't open the Animation tab to edit animations. If you just collapse the shader resource again it works as expected.

https://user-images.githubusercontent.com/17763524/209969815-adb9cd73-1cd7-4756-9af2-9042ccec9442.mov

I tried this in 4.0 beta 8 as well, and interestingly it had the same problem but also another bug/hack that caused the expanded shader resource to be collapsed when it switched back to the Shader Editor. So if you clicked the Animation tab a second time you could now switch to it.

### Steps to reproduce

Create new scene (2d or 3d)
Add an AnimationPlayer to the scene so there's something in the Animation tab
Open the animation tab with the Animation player selected
Create something (2d or 3d) that has a material
Assign a new shader material
Create a new shader for the material
Expand the material and shader resources in the inspector
Notice that this opens the shader editor in the bottom
Now try to open the animation tab, notice it will switch back to the shader editor tab immediately

### Minimal reproduction project

[animation_tab_test.zip](https://www.lostminds.com/godot/animation_tab_test.zip)
void stop_child_process(OS::ProcessID p_pid);
	Ref<Theme> get_editor_theme() const { return theme; }
	Ref<Script> get_object_custom_type_base(const Object *p_object) const;
	StringName get_object_custom_type_name(const Object *p_object) const;
	Ref<Texture2D> get_object_icon(const Object *p_object, const String &p_fallback = "Object");
	Ref<Texture2D> get_class_icon(const String &p_class, const String &p_fallback = "Object") const;
	bool is_object_of_custom_type(const Object *p_object, const StringName &p_class);
	void show_accept(const String &p_text, const String &p_title);
	void show_save_accept(const String &p_text, const String &p_title);
	void show_warning(const String &p_text, const String &p_title = TTR("Warning!"));
	void _copy_warning(const String &p_str);
	void set_use_startup_benchmark(bool p_use_startup_benchmark, const String &p_startup_benchmark_file);
	Error export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only);
	Control *get_gui_base() { return gui_base; }
	Control *get_theme_base() { return gui_base->get_parent_control(); }
	void save_scene_to_path(String p_file, bool p_with_preview = true) {
		if (p_with_preview) {
			_save_scene_with_preview(p_file);
		} else {
			_save_scene(p_file);
		}
	}
	bool is_scene_in_use(const String &p_path);
	void save_layout();
	void open_export_template_manager();
	void reload_scene(const String &p_path);
	void find_all_instances_inheriting_path_in_node(Node *p_root, Node *p_node, const String &p_instance_path, List<Node *> &p_instance_list);
	void reload_instances_with_path_in_edited_scenes(const String &p_path);
	bool is_exiting() const { return exiting; }