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

recreating_octants = true;
	HashMap<IndexKey, Cell, IndexKey> cell_copy = cell_map;
	_clear_internal();
	for (const KeyValue<IndexKey, Cell> &E : cell_copy) {
		set_cell_item(Vector3i(E.key), E.value.item, E.value.rot);
	}
	recreating_octants = false;
}
void GridMap::_clear_internal() {
	for (const KeyValue<OctantKey, Octant *> &E : octant_map) {
		if (is_inside_world()) {
			_octant_exit_world(E.key);
		}
		_octant_clean_up(E.key);
		memdelete(E.value);
	}
	octant_map.clear();
	cell_map.clear();
}
void GridMap::clear() {
	_clear_internal();
	clear_baked_meshes();
}
#ifndef DISABLE_DEPRECATED
void GridMap::resource_changed(const Ref<Resource> &p_res) {
}
#endif
void GridMap::_update_octants_callback() {