### Godot version

4.0 dev Beta 10

### System information

MacBook Pro M1 Max

### Issue description

After I imported font.ttf file and move it from one folder to another under ://res godot suddenly crashed, and it still crashes after restart.

### Steps to reproduce

Import some font.ttf file and try to move into different folder

### Minimal reproduction project

N/A
_font_set_generate_mipmaps(sysf.rid, key.mipmaps);
								_font_set_multichannel_signed_distance_field(sysf.rid, key.msdf);
								_font_set_msdf_pixel_range(sysf.rid, key.msdf_range);
								_font_set_msdf_size(sysf.rid, key.msdf_source_size);
								_font_set_fixed_size(sysf.rid, key.fixed_size);
								_font_set_force_autohinter(sysf.rid, key.force_autohinter);
								_font_set_hinting(sysf.rid, key.hinting);
								_font_set_subpixel_positioning(sysf.rid, key.subpixel_positioning);
								_font_set_variation_coordinates(sysf.rid, var);
								_font_set_oversampling(sysf.rid, key.oversampling);
								_font_set_embolden(sysf.rid, key.embolden);
								_font_set_transform(sysf.rid, key.transform);
								if (system_fonts.has(key)) {
									system_fonts[key].var.push_back(sysf);
								} else {
									SystemFontCache &sysf_cache = system_fonts[key];
									sysf_cache.max_var = _font_get_face_count(sysf.rid);
									sysf_cache.var.push_back(sysf);
								}
								gl.font_rid = sysf.rid;
							}
							break;
						}
					}
				}
				prev_font = gl.font_rid;
				double scale = _font_get_scale(gl.font_rid, gl.font_size);
				if (gl.font_rid.is_valid()) {
					bool subpos = (scale != 1.0) || (_font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_ONE_HALF) || (_font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_ONE_QUARTER) || (_font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_AUTO && gl.font_size <= SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE);
					if (sd->text[j - sd->start] != 0 && !is_linebreak(sd->text[j - sd->start])) {