### Godot version

4.2 dev3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

Basically variation of #33995

### Steps to reproduce

1. Open 2D scene
2. Drag a guide
3. Undo
4. Save

### Minimal reproduction project

N/A
Ref<InputEventMouseMotion> m = p_event;
	if (m.is_valid()) {
		Point2 click = transform.affine_inverse().xform(m->get_position());
		
		Vector<_SelectResult> hovering_results_items;
		_get_canvas_items_at_pos(click, hovering_results_items);
		hovering_results_items.sort();
		
		Vector<_HoverResult> hovering_results_tmp;
		for (int i = 0; i < hovering_results_items.size(); i++) {
			CanvasItem *ci = hovering_results_items[i].item;
			if (ci->_edit_use_rect()) {
				continue;