### 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)

RenderingServer::get_singleton()->canvas_item_set_visible(debug_path_instance, agent_parent->is_visible_in_tree());
	const Vector<Vector2> &navigation_path = navigation_result->get_path();
	if (navigation_path.size() <= 1) {
		return;
	}
	Color debug_path_color = NavigationServer2D::get_singleton()->get_debug_navigation_agent_path_color();
	if (debug_use_custom) {
		debug_path_color = debug_path_custom_color;
	}
	Vector<Color> debug_path_colors;
	debug_path_colors.resize(navigation_path.size());
	debug_path_colors.fill(debug_path_color);
	RenderingServer::get_singleton()->canvas_item_add_polyline(debug_path_instance, navigation_path, debug_path_colors, debug_path_custom_line_width, false);
	if (debug_path_custom_point_size <= 0.0) {
		return;
	}
	float point_size = NavigationServer2D::get_singleton()->get_debug_navigation_agent_path_point_size();
	float half_point_size = point_size * 0.5;
	if (debug_use_custom) {
		point_size = debug_path_custom_point_size;
		half_point_size = debug_path_custom_point_size * 0.5;
	}
	for (int i = 0; i < navigation_path.size(); i++) {
		const Vector2 &vert = navigation_path[i];
		Rect2 path_point_rect = Rect2(vert.x - half_point_size, vert.y - half_point_size, point_size, point_size);
		RenderingServer::get_singleton()->canvas_item_add_rect(debug_path_instance, path_point_rect, debug_path_color);
	}
}
#endif