### 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 (drag_type == DRAG_SCALE_BOTH || drag_type == DRAG_SCALE_X || drag_type == DRAG_SCALE_Y) {
		
		if (m.is_valid()) {
			_restore_canvas_item_state(drag_selection);
			CanvasItem *ci = drag_selection[0];
			drag_to = transform.affine_inverse().xform(m->get_position());
			Transform2D parent_xform = ci->get_global_transform_with_canvas() * ci->get_transform().affine_inverse();
			Transform2D unscaled_transform = (transform * parent_xform * ci->_edit_get_transform()).orthonormalized();
			Transform2D simple_xform = (viewport->get_transform() * unscaled_transform).affine_inverse() * transform;
			bool uniform = m->is_shift_pressed();
			bool is_ctrl = m->is_ctrl_pressed();
			Point2 drag_from_local = simple_xform.xform(drag_from);
			Point2 drag_to_local = simple_xform.xform(drag_to);
			Point2 offset = drag_to_local - drag_from_local;
			Size2 scale = ci->_edit_get_scale();
			Size2 original_scale = scale;
			real_t ratio = scale.y / scale.x;
			if (drag_type == DRAG_SCALE_BOTH) {
				Size2 scale_factor = drag_to_local / drag_from_local;
				if (uniform) {
					scale *= (scale_factor.x + scale_factor.y) / 2.0;
				} else {
					scale *= scale_factor;
				}
			} else {
				Size2 scale_factor = Vector2(offset.x, -offset.y) / SCALE_HANDLE_DISTANCE;