### 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
}
			}
			add_node_menu->reset_size();
			add_node_menu->set_position(viewport->get_screen_transform().xform(b->get_position()));
			add_node_menu->popup();
			node_create_position = transform.affine_inverse().xform(b->get_position());
			return true;
		}
		if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && tool == TOOL_SELECT && !panner->is_panning()) {
			
			Point2 click = transform.affine_inverse().xform(b->get_position());
			Node *scene = EditorNode::get_singleton()->get_edited_scene();
			if (!scene) {
				return true;
			}
			
			CanvasItem *ci = nullptr;
			Vector<_SelectResult> selection = Vector<_SelectResult>();
			
			_get_canvas_items_at_pos(click, selection);
			if (!selection.is_empty()) {
				ci = selection[0].item;
			}
			if (!ci) {
				
				if (!b->is_shift_pressed()) {
					
					editor_selection->clear();
					viewport->queue_redraw();
					selected_from_canvas = true;