### Godot version

v4.0.beta.custom_build [705273140]

### System information

windows 10

### Issue description

When importing a gltf file with embedded textures, godot will extract these textures, however it won't use the Project's Import settings, resulting in the textures looking compressed and messed up.
Also it creates a image file in the project- I don't remember it doing this before(it would just keep it embedded I think).

### Steps to reproduce

open project, check the included gltf file. See how it doesn't adhere to the project's import settings for texture2d. Instead it is all compressed and messed up.

### Minimal reproduction project

[gltf import bug.zip](https://github.com/godotengine/godot/files/10521850/gltf.import.bug.zip)

mat = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
		}
		importer_mesh->add_surface(p_mesh->surface_get_primitive_type(surface_i),
				array, p_mesh->surface_get_blend_shape_arrays(surface_i), p_mesh->surface_get_lods(surface_i), mat,
				mat_name, p_mesh->surface_get_format(surface_i));
	}
	return importer_mesh;
}
Error GLTFDocument::_serialize(Ref<GLTFState> p_state, const String &p_path) {
	if (!p_state->buffers.size()) {
		p_state->buffers.push_back(Vector<uint8_t>());
	}
	
	_convert_mesh_instances(p_state);
	
	Error err = _serialize_cameras(p_state);
	if (err != OK) {
		return Error::FAILED;
	}
	
	err = _serialize_skins(p_state);
	if (err != OK) {
		return Error::FAILED;
	}
	
	err = _serialize_meshes(p_state);
	if (err != OK) {
		return Error::FAILED;
	}