### Godot version

4.2 031aa99

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

When opening any project on the current master I'm randomly getting this crash:
```
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.2.dev.custom_build (031aa99d313ceec7cdb8263957d22cae10de0b95)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] mtx_do_lock (D:\a\_work\1\s\src\vctools\crt\github\stl\src\mutex.cpp:91)
[1] std::_Mutex_base::lock (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\mutex:50)
[2] std::unique_lock<std::recursive_mutex>::unique_lock<std::recursive_mutex> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\mutex:134)
[3] MutexLock<MutexImpl<std::recursive_mutex> >::MutexLock<MutexImpl<std::recursive_mutex> > (C:\godot_source\core\os\mutex.h:122)
[4] ResourceImporterTexture::update_imports (C:\godot_source\editor\import\resource_importer_texture.cpp:93)
[5] EditorNode::_notification (C:\godot_source\editor\editor_node.cpp:584)
[6] EditorNode::_notificationv (C:\godot_source\editor\editor_node.h:118)
[7] Object::notification (C:\godot_source\core\object\object.cpp:800)
[8] SceneTree::_process_group (C:\godot_source\scene\main\scene_tree.cpp:951)
[9] SceneTree::_process (C:\godot_source\scene\main\scene_tree.cpp:1028)
[10] SceneTree::process (C:\godot_source\scene\main\scene_tree.cpp:510)
[11] Main::iteration (C:\godot_source\main\main.cpp:3434)
[12] OS_Windows::run (C:\godot_source\platform\windows\os_windows.cpp:1479)
[13] widechar_main (C:\godot_source\platform\windows\godot_windows.cpp:182)
[14] _main (C:\godot_source\platform\windows\godot_windows.cpp:204)
[15] main (C:\godot_source\platform\windows\godot_windows.cpp:218)
[16] WinMain (C:\godot_source\platform\windows\godot_windows.cpp:232)
[17] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[18] <couldn't map PC to fn name>
```
It happens quite often actually, like once in 3 or 4 runs.

### Steps to reproduce

1. Open a project

### Minimal reproduction project

Doesn't seem project-specific.
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0));
	r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress/high_quality"), false));
	r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
	r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1));
	r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/normal_map", PROPERTY_HINT_ENUM, "Detect,Enable,Disabled"), 0));
	r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/channel_pack", PROPERTY_HINT_ENUM, "sRGB Friendly,Optimized"), 0));
	r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "mipmaps/generate"), (p_preset == PRESET_3D ? true : false)));
	r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "mipmaps/limit", PROPERTY_HINT_RANGE, "-1,256"), -1));
	r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "roughness/mode", PROPERTY_HINT_ENUM, "Detect,Disabled,Red,Green,Blue,Alpha,Gray"), 0));
	r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "roughness/src_normal", PROPERTY_HINT_FILE, "*.bmp,*.dds,*.exr,*.jpeg,*.jpg,*.hdr,*.png,*.svg,*.tga,*.webp"), ""));
	r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/fix_alpha_border"), p_preset != PRESET_3D));
	r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/premult_alpha"), false));
	r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/normal_map_invert_y"), false));
	r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/hdr_as_srgb"), false));
	r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/hdr_clamp_exposure"), false));
	r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0));
	r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0));
	
	if (p_path.is_empty() || p_path.get_extension() == "svg") {
		r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
		
		r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "editor/scale_with_editor_scale"), false));
		r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "editor/convert_colors_with_editor_theme"), false));
	}
}
void ResourceImporterTexture::save_to_ctex_format(Ref<FileAccess> f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality) {