### Godot version

Godot 4.0 beta 16

### System information

Windows 10 education 21H2, mobile renderer

### Issue description

trying to open the animation tab on animatedsprite2d causes a crash. Can also happen with animatedsprite3d but not as consistently.

### Steps to reproduce

open a new project, make an animationplayer and animatedsprite2d the children of root. Make a new animation in the animationplayer and add a new spriteframe to the animatedsprite2d. With both the spriteframe and animation tabs open on the bottom panel click on animation. In a larger project this seems to cause a crash immediately (first noticed on a project with 11 animations and animatedsprite2d with 9 frames), on a new project repeatedly clicking on the animation tab will cause the crash. If first clicking on another tab such as audio and then animation the project will default to the spriteframe tab. 

Tested and occurs in beta 16 and 15 but not in 14. Seems to only happen sometimes when using animatedsprite3d instead of animatedsprite2d.

![image](https://user-images.githubusercontent.com/61514710/215531634-19fd4970-2d34-4bf1-b186-8f4384fbca8a.png)


### Minimal reproduction project

n/a
bool call_build();
	static EditorNode *get_singleton() { return singleton; }
	static EditorLog *get_log() { return singleton->log; }
	static EditorData &get_editor_data() { return singleton->editor_data; }
	static EditorFolding &get_editor_folding() { return singleton->editor_folding; }
	static HBoxContainer *get_menu_hb() { return singleton->menu_hb; }
	static VSplitContainer *get_top_split() { return singleton->top_split; }
	static String adjust_scene_name_casing(const String &root_name);
	static bool has_unsaved_changes() { return singleton->unsaved_cache; }
	static void disambiguate_filenames(const Vector<String> p_full_paths, Vector<String> &r_filenames);
	static void add_io_error(const String &p_error);
	static void progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel = false);
	static bool progress_task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_refresh = true);
	static void progress_end_task(const String &p_task);
	static void progress_add_task_bg(const String &p_task, const String &p_label, int p_steps);
	static void progress_task_step_bg(const String &p_task, int p_step = -1);
	static void progress_end_task_bg(const String &p_task);
	static void add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed = false);
	static void remove_editor_plugin(EditorPlugin *p_editor, bool p_config_changed = false);
	static void add_plugin_init_callback(EditorPluginInitializeCallback p_callback);
	static void add_init_callback(EditorNodeInitCallback p_callback) { _init_callbacks.push_back(p_callback); }