### 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
}
		for (Node *E : selection) {
			if (Object::cast_to<CanvasItem>(E) && !Object::cast_to<CanvasItem>(E)->has_meta("_edit_group_")) {
				all_group = false;
				break;
			}
		}
	}
	lock_button->set_visible(!all_locked);
	lock_button->set_disabled(selection.is_empty());
	unlock_button->set_visible(all_locked);
	group_button->set_visible(!all_group);
	group_button->set_disabled(selection.is_empty());
	ungroup_button->set_visible(all_group);
	_draw_grid();
	_draw_ruler_tool();
	_draw_axis();
	if (EditorNode::get_singleton()->get_edited_scene()) {
		_draw_locks_and_groups(EditorNode::get_singleton()->get_edited_scene());
		_draw_invisible_nodes_positions(EditorNode::get_singleton()->get_edited_scene());
	}
	_draw_selection();
	RID ci = viewport->get_canvas_item();
	RenderingServer::get_singleton()->canvas_item_add_set_transform(ci, Transform2D());
	EditorPluginList *over_plugin_list = EditorNode::get_singleton()->get_editor_plugins_over();
	if (!over_plugin_list->is_empty()) {
		over_plugin_list->forward_canvas_draw_over_viewport(viewport);
	}
	EditorPluginList *force_over_plugin_list = EditorNode::get_singleton()->get_editor_plugins_force_over();
	if (!force_over_plugin_list->is_empty()) {