### 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
p_new_sd->script_iter = memnew(ScriptIterator(p_new_sd->text, 0, p_new_sd->text.length()));
		int sd_size = p_sd->glyphs.size();
		const Glyph *sd_glyphs = p_sd->glyphs.ptr();
		for (int ov = 0; ov < p_sd->bidi_override.size(); ov++) {
			UErrorCode err = U_ZERO_ERROR;
			if (p_sd->bidi_override[ov].x >= p_start + p_length || p_sd->bidi_override[ov].y <= p_start) {
				continue;
			}
			int start = _convert_pos_inv(p_sd, MAX(0, p_start - p_sd->bidi_override[ov].x));
			int end = _convert_pos_inv(p_sd, MIN(p_start + p_length, p_sd->bidi_override[ov].y) - p_sd->bidi_override[ov].x);
			ERR_FAIL_COND_V_MSG((start < 0 || end - start > p_new_sd->utf16.length()), false, "Invalid BiDi override range.");
			
			UBiDi *bidi_iter = ubidi_openSized(end - start, 0, &err);
			ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err));
			ubidi_setLine(p_sd->bidi_iter[ov], start, end, bidi_iter, &err);
			if (U_FAILURE(err)) {
				ubidi_close(bidi_iter);
				ERR_FAIL_V_MSG(false, u_errorName(err));
			}
			p_new_sd->bidi_iter.push_back(bidi_iter);
			err = U_ZERO_ERROR;
			int bidi_run_count = ubidi_countRuns(bidi_iter, &err);
			ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err));
			for (int i = 0; i < bidi_run_count; i++) {
				int32_t _bidi_run_start = 0;
				int32_t _bidi_run_length = 0;
				ubidi_getVisualRun(bidi_iter, i, &_bidi_run_start, &_bidi_run_length);
				int32_t bidi_run_start = _convert_pos(p_sd, p_sd->bidi_override[ov].x + start + _bidi_run_start);
				int32_t bidi_run_end = _convert_pos(p_sd, p_sd->bidi_override[ov].x + start + _bidi_run_start + _bidi_run_length);
				for (int j = 0; j < sd_size; j++) {