### 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
if (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SCALE) {
		int col_axis = -1;
		float col_d = 1e20;
		for (int i = 0; i < 3; i++) {
			const Vector3 grabber_pos = gt.origin + gt.basis.get_column(i).normalized() * gizmo_scale * GIZMO_SCALE_OFFSET;
			const real_t grabber_radius = gizmo_scale * GIZMO_ARROW_SIZE;
			Vector3 r;
			if (Geometry3D::segment_intersects_sphere(ray_pos, ray_pos + ray * MAX_Z, grabber_pos, grabber_radius, &r)) {
				const real_t d = r.distance_to(ray_pos);
				if (d < col_d) {
					col_d = d;
					col_axis = i;
				}
			}
		}
		bool is_plane_scale = false;
		
		if (col_axis == -1) {
			col_d = 1e20;
			for (int i = 0; i < 3; i++) {
				const Vector3 ivec2 = gt.basis.get_column((i + 1) % 3).normalized();
				const Vector3 ivec3 = gt.basis.get_column((i + 2) % 3).normalized();
				
				
				const Vector3 grabber_pos = gt.origin + (ivec2 + ivec3) * gizmo_scale * (GIZMO_PLANE_SIZE + GIZMO_PLANE_DST * 0.6667);
				Vector3 r;
				Plane plane(gt.basis.get_column(i).normalized(), gt.origin);
				if (plane.intersects_ray(ray_pos, ray, &r)) {
					const real_t dist = r.distance_to(grabber_pos);