### 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 _version_button_pressed();
	void _update_undo_redo_allowed();
	int _save_external_resources();
	bool _validate_scene_recursive(const String &p_filename, Node *p_node);
	void _save_scene(String p_file, int idx = -1);
	void _save_all_scenes();
	int _next_unsaved_scene(bool p_valid_filename, int p_start = 0);
	void _discard_changes(const String &p_str = String());
	void _inherit_request(String p_file);
	void _instantiate_request(const Vector<String> &p_files);
	void _quick_opened();
	void _quick_run();
	void _open_command_palette();
	void _write_movie_toggled(bool p_enabled);
	void _run(bool p_current = false, const String &p_custom = "");
	void _run_native(const Ref<EditorExportPreset> &p_preset);
	void _reset_play_buttons();
	void _add_to_recent_scenes(const String &p_scene);
	void _update_recent_scenes();
	void _open_recent_scene(int p_idx);
	void _global_menu_scene(const Variant &p_tag);
	void _global_menu_new_window(const Variant &p_tag);
	void _dropped_files(const Vector<String> &p_files);
	void _add_dropped_files_recursive(const Vector<String> &p_files, String to_path);
	void _update_from_settings();
	void _renderer_selected(int);
	void _update_renderer_color();
	void _exit_editor(int p_exit_code);
	virtual void shortcut_input(const Ref<InputEvent> &p_event) override;
	bool has_main_screen() const { return true; }