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

c = CURSOR_HSIZE;
	}
	if (pan_pressed) {
		c = CURSOR_DRAG;
	}
	return c;
}
void CanvasItemEditor::_draw_text_at_position(Point2 p_position, String p_string, Side p_side) {
	Color color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
	color.a = 0.8;
	Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
	int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
	Size2 text_size = font->get_string_size(p_string, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
	switch (p_side) {
		case SIDE_LEFT:
			p_position += Vector2(-text_size.x - 5, text_size.y / 2);
			break;
		case SIDE_TOP:
			p_position += Vector2(-text_size.x / 2, -5);
			break;
		case SIDE_RIGHT:
			p_position += Vector2(5, text_size.y / 2);
			break;
		case SIDE_BOTTOM:
			p_position += Vector2(-text_size.x / 2, text_size.y + 5);
			break;
	}
	viewport->draw_string(font, p_position, p_string, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, color);
}
void CanvasItemEditor::_draw_margin_at_position(int p_value, Point2 p_position, Side p_side) {