### Godot version

v4.1.beta.custom_build [522a2ea3f]

### System information

Windows 10, Vulkan, GTX 960 536.23

### Issue description

When the grid is disabled in a scene and subsequently closed, it will not be displayed again and will remain invisible unless you refresh it from the 'view' option. This doesn't happen with the origin, but sometimes its colors may appear faded if you try to activate the grid again.

### Steps to reproduce


https://github.com/godotengine/godot/assets/48926464/c31770de-55c3-403a-8d91-07fc1184cae1

Note: It is not necessary to open or create a scene, just follow the steps shown in the video.

### Minimal reproduction project

N/A
return; /
	}
	bool orthogonal = camera->get_projection() == Camera3D::PROJECTION_ORTHOGONAL;
	Vector<Color> grid_colors[3];
	Vector<Vector3> grid_points[3];
	Vector<Vector3> grid_normals[3];
	Color primary_grid_color = EDITOR_GET("editors/3d/primary_grid_color");
	Color secondary_grid_color = EDITOR_GET("editors/3d/secondary_grid_color");
	int grid_size = EDITOR_GET("editors/3d/grid_size");
	int primary_grid_steps = EDITOR_GET("editors/3d/primary_grid_steps");
	/
	grid_enable[0] = grid_visible[0] = EDITOR_GET("editors/3d/grid_xy_plane");
	grid_enable[1] = grid_visible[1] = EDITOR_GET("editors/3d/grid_yz_plane");
	grid_enable[2] = grid_visible[2] = EDITOR_GET("editors/3d/grid_xz_plane");
	/
	/
	real_t division_level_bias = EDITOR_GET("editors/3d/grid_division_level_bias");
	/
	int division_level_max = EDITOR_GET("editors/3d/grid_division_level_max");
	/
	int division_level_min = EDITOR_GET("editors/3d/grid_division_level_min");
	ERR_FAIL_COND_MSG(division_level_max < division_level_min, "The 3D grid's maximum division level cannot be lower than its minimum division level.");
	if (primary_grid_steps != 10) { /
		/
		real_t div = Math::log((real_t)primary_grid_steps) / (real_t)2.302585092994045901094;
		/
		division_level_max = (int)(division_level_max / div);
		division_level_min = (int)(division_level_min / div);
	}
	for (int a = 0; a < 3; a++) {