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

ERR_FAIL_INDEX(ABS(p_position.y), 1 << 20);
	ERR_FAIL_INDEX(ABS(p_position.z), 1 << 20);
	IndexKey key;
	key.x = p_position.x;
	key.y = p_position.y;
	key.z = p_position.z;
	OctantKey ok;
	ok.x = p_position.x / octant_size;
	ok.y = p_position.y / octant_size;
	ok.z = p_position.z / octant_size;
	if (p_item < 0) {
		
		if (cell_map.has(key)) {
			OctantKey octantkey = ok;
			ERR_FAIL_COND(!octant_map.has(octantkey));
			Octant &g = *octant_map[octantkey];
			g.cells.erase(key);
			g.dirty = true;
			cell_map.erase(key);
			_queue_octants_dirty();
		}
		return;
	}
	OctantKey octantkey = ok;
	if (!octant_map.has(octantkey)) {
		
		Octant *g = memnew(Octant);
		g->dirty = true;
		g->static_body = PhysicsServer3D::get_singleton()->body_create();
		PhysicsServer3D::get_singleton()->body_set_mode(g->static_body, PhysicsServer3D::BODY_MODE_STATIC);