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

agent = NavigationServer2D::get_singleton()->agent_create();
	NavigationServer2D::get_singleton()->agent_set_neighbor_distance(agent, neighbor_distance);
	NavigationServer2D::get_singleton()->agent_set_max_neighbors(agent, max_neighbors);
	NavigationServer2D::get_singleton()->agent_set_time_horizon_agents(agent, time_horizon_agents);
	NavigationServer2D::get_singleton()->agent_set_time_horizon_obstacles(agent, time_horizon_obstacles);
	NavigationServer2D::get_singleton()->agent_set_radius(agent, radius);
	NavigationServer2D::get_singleton()->agent_set_max_speed(agent, max_speed);
	
	navigation_query = Ref<NavigationPathQueryParameters2D>();
	navigation_query.instantiate();
	navigation_result = Ref<NavigationPathQueryResult2D>();
	navigation_result.instantiate();
	set_avoidance_layers(avoidance_layers);
	set_avoidance_mask(avoidance_mask);
	set_avoidance_priority(avoidance_priority);
	set_avoidance_enabled(avoidance_enabled);
#ifdef DEBUG_ENABLED
	NavigationServer2D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationAgent2D::_navigation_debug_changed));
#endif 
}
NavigationAgent2D::~NavigationAgent2D() {