### 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
if (sd->orientation == ORIENTATION_HORIZONTAL) {
							gl.advance = _font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x;
							gl.x_off = 0;
							gl.y_off = 0;
							sd->ascent = MAX(sd->ascent, _font_get_ascent(gl.font_rid, gl.font_size));
							sd->descent = MAX(sd->descent, _font_get_descent(gl.font_rid, gl.font_size));
						} else {
							gl.advance = _font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).y;
							gl.x_off = -Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5);
							gl.y_off = _font_get_ascent(gl.font_rid, gl.font_size);
							sd->ascent = MAX(sd->ascent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
							sd->descent = MAX(sd->descent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
						}
					}
					if (j < sd->end - 1) {
						
						if (is_whitespace(sd->text[j - sd->start])) {
							gl.advance += sd->extra_spacing[SPACING_SPACE];
						} else {
							gl.advance += sd->extra_spacing[SPACING_GLYPH];
						}
					}
					sd->upos = MAX(sd->upos, _font_get_underline_position(gl.font_rid, gl.font_size));
					sd->uthk = MAX(sd->uthk, _font_get_underline_thickness(gl.font_rid, gl.font_size));
					
					if (sd->glyphs.size() > 0) {
						Glyph &prev_gl = sd->glyphs.write[sd->glyphs.size() - 1];
						if (prev_gl.font_rid == gl.font_rid && prev_gl.font_size == gl.font_size) {
							if (sd->orientation == ORIENTATION_HORIZONTAL) {
								prev_gl.advance += _font_get_kerning(gl.font_rid, gl.font_size, Vector2i(prev_gl.index, gl.index)).x;