### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

Mac

### Issue description

The following code will not print any vertices, nor polygons. 
The `NavigationMesh` resource will not be saved correctly.

Even though we specify `bake_navigation_mesh(false)` (on the main thread)

```gdscript
func _ready() -> void:
	var navreg = $NavigationRegion3D
	navreg.bake_navigation_mesh(false)
	
	print(navreg.navmesh.get_vertices())
	print(navreg.navmesh.get_polygon_count())

	var to_save = preload("res://testresource.gd").new(navreg.navmesh)
	ResourceSaver.save(
		to_save,
		"output.tres",
		ResourceSaver.SaverFlags.FLAG_BUNDLE_RESOURCES
	)
```

### Steps to reproduce

1. Download minimal repo below
2. Run the repo
3. Check the console
4. Check `output.tres`

<img width="316" alt="Screenshot 2023-06-03 at 19 05 22" src="https://github.com/godotengine/godot/assets/100964/83ea661d-1c5a-4044-b9cc-2a5434a89280">

<img width="1028" alt="Screenshot 2023-06-03 at 19 05 34" src="https://github.com/godotengine/godot/assets/100964/cb099d0c-f626-48a4-b4f4-9a57b7988df1">


### Minimal reproduction project

[test-navmesh.zip](https://github.com/godotengine/godot/files/11642578/test-navmesh.zip)

if (!is_inside_tree()) {
		return;
	}
	Transform3D new_global_transform = get_global_transform();
	if (current_global_transform != new_global_transform) {
		current_global_transform = new_global_transform;
		NavigationServer3D::get_singleton()->region_set_transform(region, current_global_transform);
#ifdef DEBUG_ENABLED
		if (debug_instance.is_valid()) {
			RS::get_singleton()->instance_set_transform(debug_instance, current_global_transform);
		}
#endif 
	}
}
NavigationRegion3D::NavigationRegion3D() {
	set_notify_transform(true);
	region = NavigationServer3D::get_singleton()->region_create();
	NavigationServer3D::get_singleton()->region_set_owner_id(region, get_instance_id());
	NavigationServer3D::get_singleton()->region_set_enter_cost(region, get_enter_cost());
	NavigationServer3D::get_singleton()->region_set_travel_cost(region, get_travel_cost());
#ifdef DEBUG_ENABLED
	NavigationServer3D::get_singleton()->connect(SNAME("map_changed"), callable_mp(this, &NavigationRegion3D::_navigation_map_changed));
	NavigationServer3D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_update_debug_mesh));
	NavigationServer3D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion3D::_update_debug_edge_connections_mesh));
#endif 
}
NavigationRegion3D::~NavigationRegion3D() {