### 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
#else
		texsize = next_power_of_2(texsize);
#endif
		if (p_msdf) {
			texsize = MIN(texsize, 2048);
		} else {
			texsize = MIN(texsize, 1024);
		}
		if (mw > texsize) { 
#ifdef GDEXTENSION
			texsize = Math::next_power_of_2(mw);
#else
			texsize = next_power_of_2(mw);
#endif
		}
		if (mh > texsize) { 
#ifdef GDEXTENSION
			texsize = Math::next_power_of_2(mh);
#else
			texsize = next_power_of_2(mh);
#endif
		}
		ShelfPackTexture tex = ShelfPackTexture(texsize, texsize);
		tex.format = p_image_format;
		tex.imgdata.resize(texsize * texsize * p_color_size);
		{
			
			uint8_t *w = tex.imgdata.ptrw();
			ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret);