### 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
if (res.is_null()) {
						continue;
					}
					Ref<PackedScene> scn = res;
					if (scn.is_valid()) {
						Node *instantiated_scene = scn->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
						if (!instantiated_scene) {
							continue;
						}
						memdelete(instantiated_scene);
					}
					can_instantiate = true;
					break;
				}
			}
			if (can_instantiate) {
				if (!preview_node->get_parent()) { // create preview only once
					_create_preview(files);
				}
				Transform2D trans = canvas_item_editor->get_canvas_transform();
				preview_node->set_position((p_point - trans.get_origin()) / trans.get_scale().x);
				label->set_text(vformat(TTR("Adding %s..."), default_texture_node_type));
			}
			return can_instantiate;
		}
	}
	label->hide();
	return false;
}
void CanvasItemEditorViewport::_show_resource_type_selector() {