### Godot version

4.0.2

### System information

Windows 10,Radeon RX 550/550 Series,23.3.2,Vulkan

### Issue description

After Switching to the animations tabs and pressing the key symbol because I wanted to know what it does, Godot crashes

### Steps to reproduce

Go into a project 
Switch to the Animations Tab, make sure no animation is active 
And then press on the key symbol

here is a video demonstrating the bug

https://user-images.githubusercontent.com/59411880/233839816-5489899e-828f-4ac9-9de3-7914f727f754.mp4



### Minimal reproduction project

The File
[package.zip](https://github.com/godotengine/godot/files/11303712/package.zip)

if (parent_ci) {
			target_pos = parent_ci->get_global_transform_with_canvas().affine_inverse().xform(target_pos);
		}
		// Preserve instance position of the original scene.
		target_pos += instance_ci->_edit_get_position();
		undo_redo->add_do_method(instantiated_scene, "set_position", target_pos);
	}
	return true;
}
void CanvasItemEditorViewport::_perform_drop_data() {
	_remove_preview();
	// Without root dropping multiple files is not allowed
	if (!target_node && selected_files.size() > 1) {
		accept->set_text(TTR("Cannot instantiate multiple nodes without root."));
		accept->popup_centered();
		return;
	}
	Vector<String> error_files;
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	undo_redo->create_action(TTR("Create Node"));
	for (int i = 0; i < selected_files.size(); i++) {
		String path = selected_files[i];
		Ref<Resource> res = ResourceLoader::load(path);
		if (res.is_null()) {
			continue;
		}
		Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res));
		if (scene != nullptr && scene.is_valid()) {
			if (!target_node) {
				// Without root node act the same as "Load Inherited Scene"