### Godot version

v4.1.rc1.mono.official [1f9e540f1]

### System information

Godot v4.1.rc1.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 Ti with Max-Q Design (NVIDIA; 31.0.15.3179) - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 Threads)

### Issue description

When NavigationAgent3D is instantiated at runtime and added to the scene tree, invisible/impassable obstacle is added at the global origin position (0, 0, 0).

### Steps to reproduce

1. Run attached MRP
2. Click with `left mouse button` at the world origin to make agent walk
3. Click `space` on your keyboard to instantiate NavigationAgent3D
4. Click left mouse button to walk through world origin position again
5. Player gets stuck on obstacle at the world origin position

https://github.com/godotengine/godot/assets/8630984/fc9b32fb-25cb-46d6-9a98-ff299e2c0b1c



### Minimal reproduction project

[MRP.zip](https://github.com/godotengine/godot/files/11910363/MRP.zip)

const Vector<int32_t> &navigation_path_types = navigation_result->get_path_types();
		const TypedArray<RID> &navigation_path_rids = navigation_result->get_path_rids();
		const Vector<int64_t> &navigation_path_owners = navigation_result->get_path_owner_ids();
		while (origin.distance_to(navigation_path[navigation_path_index] - Vector3(0, path_height_offset, 0)) < path_desired_distance) {
			Dictionary details;
			const Vector3 waypoint = navigation_path[navigation_path_index];
			details[SNAME("position")] = waypoint;
			int waypoint_type = -1;
			if (path_metadata_flags.has_flag(NavigationPathQueryParameters3D::PathMetadataFlags::PATH_METADATA_INCLUDE_TYPES)) {
				const NavigationPathQueryResult3D::PathSegmentType type = NavigationPathQueryResult3D::PathSegmentType(navigation_path_types[navigation_path_index]);
				details[SNAME("type")] = type;
				waypoint_type = type;
			}
			if (path_metadata_flags.has_flag(NavigationPathQueryParameters3D::PathMetadataFlags::PATH_METADATA_INCLUDE_RIDS)) {
				details[SNAME("rid")] = navigation_path_rids[navigation_path_index];
			}
			if (path_metadata_flags.has_flag(NavigationPathQueryParameters3D::PathMetadataFlags::PATH_METADATA_INCLUDE_OWNERS)) {
				const ObjectID waypoint_owner_id = ObjectID(navigation_path_owners[navigation_path_index]);
				
				Object *owner = nullptr;
				if (waypoint_owner_id.is_valid()) {
					owner = ObjectDB::get_instance(waypoint_owner_id);
				}
				details[SNAME("owner")] = owner;
				if (waypoint_type == NavigationPathQueryResult3D::PATH_SEGMENT_TYPE_LINK) {
					const NavigationLink3D *navlink = Object::cast_to<NavigationLink3D>(owner);
					if (navlink) {
						Vector3 link_global_start_position = navlink->get_global_start_position();
						Vector3 link_global_end_position = navlink->get_global_end_position();
						if (waypoint.distance_to(link_global_start_position) < waypoint.distance_to(link_global_end_position)) {