### 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
hb_tag_to_string(hb_script_to_iso15924_tag(p_script), scr_buffer);
			String script_code = String(scr_buffer);
			String locale = (p_sd->spans[p_span].language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_sd->spans[p_span].language;
			PackedStringArray fallback_font_name = OS::get_singleton()->get_system_font_path_for_text(font_name, text, locale, script_code, font_weight, font_stretch, font_style & TextServer::FONT_ITALIC);
#ifdef GDEXTENSION
			for (int fb = 0; fb < fallback_font_name.size(); fb++) {
				const String &E = fallback_font_name[fb];
#else
			for (const String &E : fallback_font_name) {
#endif
				SystemFontKey key = SystemFontKey(E, font_style & TextServer::FONT_ITALIC, font_weight, font_stretch, fdef, this);
				if (system_fonts.has(key)) {
					const SystemFontCache &sysf_cache = system_fonts[key];
					int best_score = 0;
					int best_match = -1;
					for (int face_idx = 0; face_idx < sysf_cache.var.size(); face_idx++) {
						const SystemFontCacheRec &F = sysf_cache.var[face_idx];
						if (unlikely(!_font_has_char(F.rid, text[0]))) {
							continue;
						}
						BitField<FontStyle> style = _font_get_style(F.rid);
						int weight = _font_get_weight(F.rid);
						int stretch = _font_get_stretch(F.rid);
						int score = (20 - Math::abs(weight - font_weight) / 50);
						score += (20 - Math::abs(stretch - font_stretch) / 10);
						if (bool(style & TextServer::FONT_ITALIC) == bool(font_style & TextServer::FONT_ITALIC)) {
							score += 30;
						}
						if (score >= best_score) {
							best_score = score;