### Godot version

4.1rc2

### System information

Linux Manjaro

### Issue description

Editor crashes whenever a scene inheriting from `NavigationAgent3D` is being opened:

```
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.rc.custom_build (46424488edc341b65467ee7fd3ac423e4d49ad34)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x38f50) [0x7ff969664f50] (??:0)
[2] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x3541ea5) [0x5580ee733ea5] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/3d/node_3d.cpp:324)
[3] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x351e9c1) [0x5580ee7109c1] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/3d/navigation_agent_3d.cpp:224)
[4] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x5014e94) [0x5580f0206e94] (/home/scony/Gamedev/godot-engine/godot/godot-master/core/object/object.cpp:798)
[5] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x2f9ca7a) [0x5580ee18ea7a] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/main/node.cpp:228)
[6] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x2fa0177) [0x5580ee192177] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/main/node.cpp:2907)
[7] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x2fb485b) [0x5580ee1a685b] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/main/node.cpp:1381)
[8] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x1ef73fd) [0x5580ed0e93fd] (/home/scony/Gamedev/godot-engine/godot/godot-master/editor/editor_node.cpp:3445)
[9] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x1f20aae) [0x5580ed112aae] (/home/scony/Gamedev/godot-engine/godot/godot-master/editor/editor_node.cpp:3746)
[10] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x1f218c7) [0x5580ed1138c7] (/home/scony/Gamedev/godot-engine/godot/godot-master/editor/editor_node.cpp:3948)
[11] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x211ca04) [0x5580ed30ea04] (/home/scony/Gamedev/godot-engine/godot/godot-master/editor/filesystem_dock.cpp:1148)
[12] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x211cf32) [0x5580ed30ef32] (/home/scony/Gamedev/godot-engine/godot/godot-master/./core/templates/cowdata.h:412)
[13] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x5021575) [0x5580f0213575] (/home/scony/Gamedev/godot-engine/godot/godot-master/core/object/object.cpp:1069)
[14] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x338af73) [0x5580ee57cf73] (/home/scony/Gamedev/godot-engine/godot/godot-master/./core/variant/variant.h:301)
[15] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x33a7848) [0x5580ee599848] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/gui/tree.cpp:3866 (discriminator 4))
[16] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x3024c21) [0x5580ee216c21] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/main/viewport.cpp:1545)
[17] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x302be0b) [0x5580ee21de0b] (/home/scony/Gamedev/godot-engine/godot/godot-master/scene/main/viewport.cpp:1776)
[18] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x30427d8) [0x5580ee2347d8] (/home/scony/Gamedev/godot-engine/godot/godot-master/./core/object/ref_counted.h:209)
[19] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x308ac36) [0x5580ee27cc36] (/home/scony/Gamedev/godot-engine/godot/godot-master/./core/object/ref_counted.h:209)
[20] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0xc0c76b) [0x5580ebdfe76b] (/home/scony/Gamedev/godot-engine/godot/godot-master/platform/linuxbsd/x11/display_server_x11.cpp:3723)
[21] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x4cefba3) [0x5580efee1ba3] (/usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:749)
[22] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0x4cf2758) [0x5580efee4758] (/home/scony/Gamedev/godot-engine/godot/godot-master/./core/object/ref_counted.h:209)
[23] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0xc0dd99) [0x5580ebdffd99] (/home/scony/Gamedev/godot-engine/godot/godot-master/./core/templates/local_vector.h:319)
[24] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0xbe5970) [0x5580ebdd7970] (/home/scony/Gamedev/godot-engine/godot/godot-master/platform/linuxbsd/os_linuxbsd.cpp:910)
[25] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0xbd6c09) [0x5580ebdc8c09] (/home/scony/Gamedev/godot-engine/godot/godot-master/platform/linuxbsd/godot_linuxbsd.cpp:76)
[26] /usr/lib/libc.so.6(+0x23790) [0x7ff96964f790] (??:0)
[27] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7ff96964f84a] (??:0)
[28] /home/scony/Gamedev/godot-engine/godot/godot-master/bin/godot.linuxbsd.editor.x86_64(+0xbe3b65) [0x5580ebdd5b65] (??:?)
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

1. Clone https://github.com/lampe-games/godot-open-rts/tree/8b5f3c99d28b56d59591f3ea3d8657586b5ac48a
2. Open the project in editor
3. Open `source/match/units/traits/Movement.tscn`
4. Observe crash

### Minimal reproduction project

See above
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1,or_greater"), "set_max_neighbors", "get_max_neighbors");
	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon_agents", PROPERTY_HINT_RANGE, "0.0,10,0.01,or_greater,suffix:s"), "set_time_horizon_agents", "get_time_horizon_agents");
	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon_obstacles", PROPERTY_HINT_RANGE, "0.0,10,0.01,or_greater,suffix:s"), "set_time_horizon_obstacles", "get_time_horizon_obstacles");
	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.01,10000,0.01,or_greater,suffix:m/s"), "set_max_speed", "get_max_speed");
	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_3d_avoidance"), "set_use_3d_avoidance", "get_use_3d_avoidance");
	ADD_PROPERTY(PropertyInfo(Variant::INT, "avoidance_layers", PROPERTY_HINT_LAYERS_AVOIDANCE), "set_avoidance_layers", "get_avoidance_layers");
	ADD_PROPERTY(PropertyInfo(Variant::INT, "avoidance_mask", PROPERTY_HINT_LAYERS_AVOIDANCE), "set_avoidance_mask", "get_avoidance_mask");
	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "avoidance_priority", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_avoidance_priority", "get_avoidance_priority");
	ADD_SIGNAL(MethodInfo("path_changed"));
	ADD_SIGNAL(MethodInfo("target_reached"));
	ADD_SIGNAL(MethodInfo("waypoint_reached", PropertyInfo(Variant::DICTIONARY, "details")));
	ADD_SIGNAL(MethodInfo("link_reached", PropertyInfo(Variant::DICTIONARY, "details")));
	ADD_SIGNAL(MethodInfo("navigation_finished"));
	ADD_SIGNAL(MethodInfo("velocity_computed", PropertyInfo(Variant::VECTOR3, "safe_velocity")));
	ClassDB::bind_method(D_METHOD("set_debug_enabled", "enabled"), &NavigationAgent3D::set_debug_enabled);
	ClassDB::bind_method(D_METHOD("get_debug_enabled"), &NavigationAgent3D::get_debug_enabled);
	ClassDB::bind_method(D_METHOD("set_debug_use_custom", "enabled"), &NavigationAgent3D::set_debug_use_custom);
	ClassDB::bind_method(D_METHOD("get_debug_use_custom"), &NavigationAgent3D::get_debug_use_custom);
	ClassDB::bind_method(D_METHOD("set_debug_path_custom_color", "color"), &NavigationAgent3D::set_debug_path_custom_color);
	ClassDB::bind_method(D_METHOD("get_debug_path_custom_color"), &NavigationAgent3D::get_debug_path_custom_color);
	ClassDB::bind_method(D_METHOD("set_debug_path_custom_point_size", "point_size"), &NavigationAgent3D::set_debug_path_custom_point_size);
	ClassDB::bind_method(D_METHOD("get_debug_path_custom_point_size"), &NavigationAgent3D::get_debug_path_custom_point_size);
	ADD_GROUP("Debug", "debug_");
	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "debug_enabled"), "set_debug_enabled", "get_debug_enabled");
	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "debug_use_custom"), "set_debug_use_custom", "get_debug_use_custom");
	ADD_PROPERTY(PropertyInfo(Variant::COLOR, "debug_path_custom_color"), "set_debug_path_custom_color", "get_debug_path_custom_color");
	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "debug_path_custom_point_size", PROPERTY_HINT_RANGE, "0,50,0.01,or_greater,suffix:px"), "set_debug_path_custom_point_size", "get_debug_path_custom_point_size");
}
#ifndef DISABLE_DEPRECATED
bool NavigationAgent3D::_set(const StringName &p_name, const Variant &p_value) {