### Godot version

3.5.2 RC2

### System information

Windows 10

### Issue description

If a gridmap is hidden in the editor and `get_tree().reload_current_scene()` is used, the gridmap will reappear on reset. Using `hide()` or `visible = false` in `_ready()` will not work:
![image](https://github.com/godotengine/godot/assets/16231628/1843f94c-1106-4f6a-ba97-4063174d8714)

The only fix is to use:
![image](https://github.com/godotengine/godot/assets/16231628/e2392aa2-3e79-4d43-bc92-0457319a4b60)


```swift
func _ready():
    show()
    hide()
```

### Steps to reproduce

- Add a gridmap node
- Set visibility in editor to false
- Use `get_tree().reload_current_scene()`

### Minimal reproduction project

[brokenhideshow.zip](https://github.com/godotengine/godot/files/12441673/brokenhideshow.zip)

st->begin(Mesh::PRIMITIVE_TRIANGLES);
				st->set_material(surf_mat);
				mat_map[surf_mat] = st;
			}
			mat_map[surf_mat]->append_from(mesh, i, xform);
		}
	}
	for (KeyValue<OctantKey, HashMap<Ref<Material>, Ref<SurfaceTool>>> &E : surface_map) {
		Ref<ArrayMesh> mesh;
		mesh.instantiate();
		for (KeyValue<Ref<Material>, Ref<SurfaceTool>> &F : E.value) {
			F.value->commit(mesh);
		}
		BakedMesh bm;
		bm.mesh = mesh;
		bm.instance = RS::get_singleton()->instance_create();
		RS::get_singleton()->instance_set_base(bm.instance, bm.mesh->get_rid());
		RS::get_singleton()->instance_attach_object_instance_id(bm.instance, get_instance_id());
		if (is_inside_tree()) {
			RS::get_singleton()->instance_set_scenario(bm.instance, get_world_3d()->get_scenario());
			RS::get_singleton()->instance_set_transform(bm.instance, get_global_transform());
		}
		if (p_gen_lightmap_uv) {
			mesh->lightmap_unwrap(get_global_transform(), p_lightmap_uv_texel_size);
		}
		baked_meshes.push_back(bm);
	}
	_recreate_octant_data();
}
Array GridMap::get_bake_meshes() {