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

if (!awaiting_update) {
		return;
	}
	List<OctantKey> to_delete;
	for (const KeyValue<OctantKey, Octant *> &E : octant_map) {
		if (_octant_update(E.key)) {
			to_delete.push_back(E.key);
		}
	}
	while (to_delete.front()) {
		memdelete(octant_map[to_delete.front()->get()]);
		octant_map.erase(to_delete.front()->get());
		to_delete.pop_front();
	}
	_update_visibility();
	awaiting_update = false;
}
void GridMap::_bind_methods() {
	ClassDB::bind_method(D_METHOD("set_collision_layer", "layer"), &GridMap::set_collision_layer);
	ClassDB::bind_method(D_METHOD("get_collision_layer"), &GridMap::get_collision_layer);
	ClassDB::bind_method(D_METHOD("set_collision_mask", "mask"), &GridMap::set_collision_mask);
	ClassDB::bind_method(D_METHOD("get_collision_mask"), &GridMap::get_collision_mask);
	ClassDB::bind_method(D_METHOD("set_collision_mask_value", "layer_number", "value"), &GridMap::set_collision_mask_value);
	ClassDB::bind_method(D_METHOD("get_collision_mask_value", "layer_number"), &GridMap::get_collision_mask_value);
	ClassDB::bind_method(D_METHOD("set_collision_layer_value", "layer_number", "value"), &GridMap::set_collision_layer_value);
	ClassDB::bind_method(D_METHOD("get_collision_layer_value", "layer_number"), &GridMap::get_collision_layer_value);
	ClassDB::bind_method(D_METHOD("set_collision_priority", "priority"), &GridMap::set_collision_priority);
	ClassDB::bind_method(D_METHOD("get_collision_priority"), &GridMap::get_collision_priority);