### 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
sd->script_iter = memnew(ScriptIterator(sd->text, 0, sd->text.length()));
	}
	if (sd->bidi_override.is_empty()) {
		sd->bidi_override.push_back(Vector2i(sd->start, sd->end));
	}
	for (int ov = 0; ov < sd->bidi_override.size(); ov++) {
		
		int start = _convert_pos_inv(sd, sd->bidi_override[ov].x - sd->start);
		int end = _convert_pos_inv(sd, sd->bidi_override[ov].y - sd->start);
		if (start < 0 || end - start > sd->utf16.length()) {
			continue;
		}
		UErrorCode err = U_ZERO_ERROR;
		UBiDi *bidi_iter = ubidi_openSized(end, 0, &err);
		ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err));
		switch (sd->direction) {
			case DIRECTION_LTR: {
				ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_LTR, nullptr, &err);
				sd->para_direction = DIRECTION_LTR;
			} 
			case DIRECTION_RTL: {
				ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_RTL, nullptr, &err);
				sd->para_direction = DIRECTION_RTL;
			} 
			case DIRECTION_AUTO: {
				UBiDiDirection direction = ubidi_getBaseDirection(data + start, end - start);
				if (direction != UBIDI_NEUTRAL) {
					ubidi_setPara(bidi_iter, data + start, end - start, direction, nullptr, &err);
					sd->para_direction = (direction == UBIDI_RTL) ? DIRECTION_RTL : DIRECTION_LTR;
				} else {