### 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
select_button->set_shortcut_context(this);
	select_button->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+Drag: Move selected node.") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Alt+Drag: Scale selected node.") + "\n" + TTR("V: Set selected node's pivot position.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked.") + "\n" + TTR("RMB: Add node at position clicked."));
	main_menu_hbox->add_child(memnew(VSeparator));
	move_button = memnew(Button);
	move_button->set_flat(true);
	main_menu_hbox->add_child(move_button);
	move_button->set_toggle_mode(true);
	move_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_MOVE));
	move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), Key::W));
	move_button->set_shortcut_context(this);
	move_button->set_tooltip_text(TTR("Move Mode"));
	rotate_button = memnew(Button);
	rotate_button->set_flat(true);
	main_menu_hbox->add_child(rotate_button);
	rotate_button->set_toggle_mode(true);
	rotate_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_ROTATE));
	rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), Key::E));
	rotate_button->set_shortcut_context(this);
	rotate_button->set_tooltip_text(TTR("Rotate Mode"));
	scale_button = memnew(Button);
	scale_button->set_flat(true);
	main_menu_hbox->add_child(scale_button);
	scale_button->set_toggle_mode(true);
	scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SCALE));
	scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), Key::S));
	scale_button->set_shortcut_context(this);
	scale_button->set_tooltip_text(TTR("Shift: Scale proportionally."));
	main_menu_hbox->add_child(memnew(VSeparator));
	list_select_button = memnew(Button);
	list_select_button->set_flat(true);