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

PhysicsServer3D::get_singleton()->body_attach_object_instance_id(g->static_body, get_instance_id());
		PhysicsServer3D::get_singleton()->body_set_collision_layer(g->static_body, collision_layer);
		PhysicsServer3D::get_singleton()->body_set_collision_mask(g->static_body, collision_mask);
		PhysicsServer3D::get_singleton()->body_set_collision_priority(g->static_body, collision_priority);
		if (physics_material.is_valid()) {
			PhysicsServer3D::get_singleton()->body_set_param(g->static_body, PhysicsServer3D::BODY_PARAM_FRICTION, physics_material->get_friction());
			PhysicsServer3D::get_singleton()->body_set_param(g->static_body, PhysicsServer3D::BODY_PARAM_BOUNCE, physics_material->get_bounce());
		}
		SceneTree *st = SceneTree::get_singleton();
		if (st && st->is_debugging_collisions_hint()) {
			g->collision_debug = RenderingServer::get_singleton()->mesh_create();
			g->collision_debug_instance = RenderingServer::get_singleton()->instance_create();
			RenderingServer::get_singleton()->instance_set_base(g->collision_debug_instance, g->collision_debug);
		}
		octant_map[octantkey] = g;
		if (is_inside_world()) {
			_octant_enter_world(octantkey);
			_octant_transform(octantkey);
		}
	}
	Octant &g = *octant_map[octantkey];
	g.cells.insert(key);
	g.dirty = true;
	_queue_octants_dirty();
	Cell c;
	c.item = p_item;
	c.rot = p_rot;
	cell_map[key] = c;
}
int GridMap::get_cell_item(const Vector3i &p_position) const {