### Godot version

v4.1.rc2.official.46424488e

### System information

Ubuntu 23.04, Vulkan, NVIDIA GeForce RTX™ 2060 / NVIDIA GeForce RTX™ 2060, NVIDIA Driver Version: 525.105.17, NVML Version: 12.525.105.17

### Issue description

Navigation server should compute (and recompute) the shortest path to the target. In this example I have two unlinked nav meshes  and we want to showcase the edge connection feature in v4.1 with this moving platform. When the connection gets broken and the agent needs to recompute the path it goes to the side instead of remaining stationary.

Expected result is like in the first part of the demo where the agent moves to the edge of the nav mesh then waits for the platform.


https://github.com/godotengine/godot/assets/1177508/7d1b307b-d7c9-4042-b3c2-ab1ae695ebab

### Steps to reproduce

Run the demo and notice that when the agent has to recompute the path because the link is broken due to the moving platform it computes a path to the side which is not what's expected. The expected behavior is to find the point closest to the target position (on the other island) which in this case should be the middle of the platform where the moving platform connects.

This looks like a bug to me.

### Minimal reproduction project

[godot-4-dbg.zip](https://github.com/godotengine/godot/files/11929237/godot-4-dbg.zip)

ERR_FAIL_COND_V_MSG(map_update_id == 0, Vector3(), "NavigationServer map query failed because it was made before first map synchronization.");
	gd::ClosestPointQueryResult cp = get_closest_point_info(p_point);
	return cp.normal;
}
RID NavMap::get_closest_point_owner(const Vector3 &p_point) const {
	ERR_FAIL_COND_V_MSG(map_update_id == 0, RID(), "NavigationServer map query failed because it was made before first map synchronization.");
	gd::ClosestPointQueryResult cp = get_closest_point_info(p_point);
	return cp.owner;
}
gd::ClosestPointQueryResult NavMap::get_closest_point_info(const Vector3 &p_point) const {
	gd::ClosestPointQueryResult result;
	real_t closest_point_ds = FLT_MAX;
	for (const gd::Polygon &p : polygons) {
		
		for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) {
			const Face3 f(p.points[0].pos, p.points[point_id - 1].pos, p.points[point_id].pos);
			const Vector3 inters = f.get_closest_point_to(p_point);
			const real_t ds = inters.distance_squared_to(p_point);
			if (ds < closest_point_ds) {
				result.point = inters;
				result.normal = f.get_plane().normal;
				result.owner = p.owner->get_self();
				closest_point_ds = ds;
			}
		}
	}
	return result;
}
void NavMap::add_region(NavRegion *p_region) {