### Godot version

4.0.2

### System information

Windows 10,Radeon RX 550/550 Series,23.3.2,Vulkan

### Issue description

After Switching to the animations tabs and pressing the key symbol because I wanted to know what it does, Godot crashes

### Steps to reproduce

Go into a project 
Switch to the Animations Tab, make sure no animation is active 
And then press on the key symbol

here is a video demonstrating the bug

https://user-images.githubusercontent.com/59411880/233839816-5489899e-828f-4ac9-9de3-7914f727f754.mp4



### Minimal reproduction project

The File
[package.zip](https://github.com/godotengine/godot/files/11303712/package.zip)

} else if (locked == 2) {
						suffix = " (" + TTR("Grouped") + ")";
					}
					selection_menu->add_item((String)item->get_name() + suffix);
					selection_menu->set_item_icon(i, icon);
					selection_menu->set_item_metadata(i, node_path);
					selection_menu->set_item_tooltip(i, String(item->get_name()) + "\nType: " + item->get_class() + "\nPath: " + node_path);
				}
				selection_results_menu = selection_results;
				selection_menu_additive_selection = b->is_shift_pressed();
				selection_menu->set_position(viewport->get_screen_transform().xform(b->get_position()));
				selection_menu->reset_size();
				selection_menu->popup();
				return true;
			}
		}
		if (b.is_valid() && b->is_pressed() && b->get_button_index() == MouseButton::RIGHT) {
			add_node_menu->clear();
			add_node_menu->add_icon_item(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), TTR("Add Node Here"), ADD_NODE);
			add_node_menu->add_icon_item(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Instantiate Scene Here"), ADD_INSTANCE);
			for (Node *node : SceneTreeDock::get_singleton()->get_node_clipboard()) {
				if (Object::cast_to<CanvasItem>(node)) {
					add_node_menu->add_icon_item(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")), TTR("Paste Node(s) Here"), ADD_PASTE);
					break;
				}
			}
			for (Node *node : EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list()) {
				if (Object::cast_to<CanvasItem>(node)) {
					add_node_menu->add_icon_item(get_theme_icon(SNAME("ToolMove"), SNAME("EditorIcons")), TTR("Move Node(s) Here"), ADD_MOVE);
					break;