### 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)

if (selection_results_menu.size() <= p_result) {
		return;
	}
	CanvasItem *item = selection_results_menu[p_result].item;
	if (item) {
		_select_click_on_item(item, Point2(), selection_menu_additive_selection);
	}
	selection_results_menu.clear();
}
void CanvasItemEditor::_selection_menu_hide() {
	selection_results.clear();
	selection_menu->clear();
	selection_menu->reset_size();
}
void CanvasItemEditor::_add_node_pressed(int p_result) {
	List<Node *> nodes_to_move;
	switch (p_result) {
		case ADD_NODE: {
			SceneTreeDock::get_singleton()->open_add_child_dialog();
		} break;
		case ADD_INSTANCE: {
			SceneTreeDock::get_singleton()->open_instance_child_dialog();
		} break;
		case ADD_PASTE: {
			nodes_to_move = SceneTreeDock::get_singleton()->paste_nodes();
			[[fallthrough]];
		}
		case ADD_MOVE: {
			nodes_to_move = EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list();