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

return avoidance_mask;
}
void NavigationAgent3D::set_avoidance_layer_value(int p_layer_number, bool p_value) {
	ERR_FAIL_COND_MSG(p_layer_number < 1, "Avoidance layer number must be between 1 and 32 inclusive.");
	ERR_FAIL_COND_MSG(p_layer_number > 32, "Avoidance layer number must be between 1 and 32 inclusive.");
	uint32_t avoidance_layers_new = get_avoidance_layers();
	if (p_value) {
		avoidance_layers_new |= 1 << (p_layer_number - 1);
	} else {
		avoidance_layers_new &= ~(1 << (p_layer_number - 1));
	}
	set_avoidance_layers(avoidance_layers_new);
}
bool NavigationAgent3D::get_avoidance_layer_value(int p_layer_number) const {
	ERR_FAIL_COND_V_MSG(p_layer_number < 1, false, "Avoidance layer number must be between 1 and 32 inclusive.");
	ERR_FAIL_COND_V_MSG(p_layer_number > 32, false, "Avoidance layer number must be between 1 and 32 inclusive.");
	return get_avoidance_layers() & (1 << (p_layer_number - 1));
}
void NavigationAgent3D::set_avoidance_mask_value(int p_mask_number, bool p_value) {
	ERR_FAIL_COND_MSG(p_mask_number < 1, "Avoidance mask number must be between 1 and 32 inclusive.");
	ERR_FAIL_COND_MSG(p_mask_number > 32, "Avoidance mask number must be between 1 and 32 inclusive.");
	uint32_t mask = get_avoidance_mask();
	if (p_value) {
		mask |= 1 << (p_mask_number - 1);
	} else {
		mask &= ~(1 << (p_mask_number - 1));
	}
	set_avoidance_mask(mask);
}
bool NavigationAgent3D::get_avoidance_mask_value(int p_mask_number) const {