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

for (int i = 0; i < 4; i++) {
					int prev = (i + 3) % 4;
					int next = (i + 1) % 4;
					Vector2 ofs = ((endpoints[i] - endpoints[prev]).normalized() + ((endpoints[i] - endpoints[next]).normalized())).normalized();
					ofs *= Math_SQRT2 * (select_handle->get_size().width / 2);
					select_handle->draw(vp_ci, (endpoints[i] + ofs - (select_handle->get_size() / 2)).floor());
					ofs = (endpoints[i] + endpoints[next]) / 2;
					ofs += (endpoints[next] - endpoints[i]).orthogonal().normalized() * (select_handle->get_size().width / 2);
					select_handle->draw(vp_ci, (ofs - (select_handle->get_size() / 2)).floor());
				}
			}
			// D
			bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL);
			bool is_alt = Input::get_singleton()->is_key_pressed(Key::ALT);
			if (tool == TOOL_MOVE && show_transformation_gizmos) {
				if (_is_node_movable(ci)) {
					Transform2D unscaled_transform = (xform * ci->get_transform().affine_inverse() * ci->_edit_get_transform()).orthonormalized();
					Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
					Size2 move_factor = Size2(MOVE_HANDLE_DISTANCE, MOVE_HANDLE_DISTANCE);
					viewport->draw_set_transform_matrix(simple_xform);
					Vector<Point2> points = {
						Vector2(move_factor.x * EDSCALE, 5 * EDSCALE),
						Vector2(move_factor.x * EDSCALE, -5 * EDSCALE),
						Vector2((move_factor.x + 10) * EDSCALE, 0)
					};
					viewport->draw_colored_polygon(points, get_theme_color(SNAME("axis_x_color"), SNAME("Editor")));
					viewport->draw_line(Point2(), Point2(move_factor.x * EDSCALE, 0), get_theme_color(SNAME("axis_x_color"), SNAME("Editor")), Math::round(EDSCALE));
					points.clear();
					points.push_back(Vector2(5 * EDSCALE, move_factor.y * EDSCALE));
					points.push_back(Vector2(-5 * EDSCALE, move_factor.y * EDSCALE));