### Godot version

4.2.dev

### System information

Godot v4.2.dev (fc99492d3) - Arch Linux #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 - Wayland - Vulkan (Forward+) - dedicated Intel(R) Arc(tm) A730M Graphics (DG2) () - 12th Gen Intel(R) Core(TM) i7-12700H (20 Threads)

### Issue description

Hello! I'm new to godot engine.

I just follow the First3D game toturial, when it's time to create another scene (2nd section: https://docs.godotengine.org/en/latest/getting_started/first_3d_game/02.player_input.html). 

I use `ctrl+x` to clip node, and create anothre scene. There was a `Paste from clipboad` button. Then I clicked, the editor was crashed.

I tried `ctrl+c`, it still. Seems will crash when do past operation.

### Steps to reproduce

Copy or clicp some nodes, and click `pasted from clipboard button` in another scene.

The console logs:

```log
→  godot:(godot) $ godot.linuxbsd.editor.x86_64
Godot Engine v4.2.dev.custom_build.fc99492d3 - https://godotengine.org
WARNING: XOpenIM failed
     at: DisplayServerX11 (platform/linuxbsd/x11/display_server_x11.cpp:5695)
WARNING: XCreateIC couldn't create wd.xic
     at: _create_window (platform/linuxbsd/x11/display_server_x11.cpp:5323)
OpenGL API 4.6 (Core Profile) Mesa 23.1.6-arch1.4 - Compatibility - Using Device: Intel - Mesa Intel(R) Graphics (ADL GT2)

Editing project: /home/nono/godot_projects/squash_the_creeps_start_1.1.0
Godot Engine v4.2.dev.custom_build.fc99492d3 - https://godotengine.org
WARNING: XOpenIM failed
     at: DisplayServerX11 (platform/linuxbsd/x11/display_server_x11.cpp:5695)
WARNING: XCreateIC couldn't create wd.xic
     at: _create_window (platform/linuxbsd/x11/display_server_x11.cpp:5323)
Vulkan API 1.3.246 - Forward+ - Using Vulkan Device #1: Intel - Intel(R) Arc(tm) A730M Graphics (DG2)

→  godot:(godot) $ WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.2.dev.custom_build (fc99492d3066098e938449b10e02f8e01d07e2d1)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x3e710) [0x7f859f83e710] (??:0)
[2] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x447f230) [0x56540599e230] (??:0)
[3] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x2600760) [0x565403b1f760] (??:0)
[4] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x1a12a63) [0x565402f31a63] (??:0)
[5] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x1a13b08) [0x565402f32b08] (??:0)
[6] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x418b5cb) [0x5654056aa5cb] (??:0)
[7] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x4432c67) [0x565405951c67] (??:0)
[8] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x26eff9f) [0x565403c0ef9f] (??:0)
[9] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x26f0ce3) [0x565403c0fce3] (??:0)
[10] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x26f1086) [0x565403c10086] (??:0)
[11] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x2678230) [0x565403b97230] (??:0)
[12] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x2681640) [0x565403ba0640] (??:0)
[13] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x2698666) [0x565403bb7666] (??:0)
[14] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x26d89e5) [0x565403bf79e5] (??:0)
[15] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x57532f) [0x565401a9432f] (??:0)
[16] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x4125a3f) [0x565405644a3f] (??:0)
[17] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x412841d) [0x56540564741d] (??:0)
[18] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x57693b) [0x565401a9593b] (??:0)
[19] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x550b00) [0x565401a6fb00] (??:0)
[20] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x543898) [0x565401a62898] (??:0)
[21] /usr/lib/libc.so.6(+0x27cd0) [0x7f859f827cd0] (??:0)
[22] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f859f827d8a] (??:0)
[23] /apt/godot/bin/godot.linuxbsd.editor.x86_64(+0x54e115) [0x565401a6d115] (??:0)
-- END OF BACKTRACE --
================================================================

```

### Minimal reproduction project

N/A
for (Node *E : owned) {
			owners.push_back(E);
		}
		bool same_parent = new_parent == node->get_parent();
		if (same_parent && node->get_index(false) < p_position_in_parent + ni) {
			inc--; 
		}
		if (!same_parent) {
			undo_redo->add_do_method(node->get_parent(), "remove_child", node);
			undo_redo->add_do_method(new_parent, "add_child", node, true);
		}
		int new_position_in_parent = p_position_in_parent == -1 ? -1 : p_position_in_parent + inc;
		if (new_position_in_parent >= 0 || same_parent) {
			undo_redo->add_do_method(new_parent, "move_child", node, new_position_in_parent);
		}
		EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
		String old_name = former_names[ni];
		String new_name = new_parent->validate_child_name(node);
		
		if (old_name.casecmp_to(new_name) != 0) {
			
			HashMap<Node *, NodePath>::Iterator found_path = path_renames.find(node);
			if (found_path) {
				NodePath old_new_name = found_path->value;
				Vector<StringName> unfixed_new_names = old_new_name.get_names();
				Vector<StringName> fixed_new_names;
				
				for (int a = 0; a < (unfixed_new_names.size() - 1); a++) {
					fixed_new_names.push_back(unfixed_new_names[a]);
				}