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

vertex_array.push_back(right_end_pos);
				vertex_array.push_back(left_start_pos);
				vertex_array.push_back(right_start_pos);
				vertex_array.push_back(left_end_pos);
				vertex_array.push_back(right_end_pos);
				vertex_array.push_back(right_start_pos);
			}
		}
	}
	if (vertex_array.size() == 0) {
		return;
	}
	Ref<StandardMaterial3D> edge_connections_material = NavigationServer3D::get_singleton()->get_debug_navigation_edge_connections_material();
	Array mesh_array;
	mesh_array.resize(Mesh::ARRAY_MAX);
	mesh_array[Mesh::ARRAY_VERTEX] = vertex_array;
	g.navigation_debug_edge_connections_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, mesh_array);
	g.navigation_debug_edge_connections_mesh->surface_set_material(0, edge_connections_material);
	RS::get_singleton()->instance_set_base(g.navigation_debug_edge_connections_instance, g.navigation_debug_edge_connections_mesh->get_rid());
	RS::get_singleton()->instance_set_visible(g.navigation_debug_edge_connections_instance, is_visible_in_tree());
	if (is_inside_tree()) {
		RS::get_singleton()->instance_set_scenario(g.navigation_debug_edge_connections_instance, get_world_3d()->get_scenario());
	}
	bool enable_edge_connections = NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_connections();
	if (!enable_edge_connections) {
		RS::get_singleton()->instance_set_visible(g.navigation_debug_edge_connections_instance, false);
	}
}
#endif