### 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)

joints_1.write[vertex_i] = joint_1;
					}
					attributes["JOINTS_0"] = _encode_accessor_as_joints(p_state, joints_0, true);
					attributes["JOINTS_1"] = _encode_accessor_as_joints(p_state, joints_1, true);
				}
			}
			{
				const Array &a = array[Mesh::ARRAY_WEIGHTS];
				const Vector<Vector3> &vertex_array = array[Mesh::ARRAY_VERTEX];
				if ((a.size() / JOINT_GROUP_SIZE) == vertex_array.size()) {
					int32_t vertex_count = vertex_array.size();
					Vector<Color> attribs;
					attribs.resize(vertex_count);
					for (int i = 0; i < vertex_count; i++) {
						attribs.write[i] = Color(a[(i * JOINT_GROUP_SIZE) + 0], a[(i * JOINT_GROUP_SIZE) + 1], a[(i * JOINT_GROUP_SIZE) + 2], a[(i * JOINT_GROUP_SIZE) + 3]);
					}
					attributes["WEIGHTS_0"] = _encode_accessor_as_weights(p_state, attribs, true);
				} else if ((a.size() / (JOINT_GROUP_SIZE * 2)) >= vertex_array.size()) {
					Vector<Color> weights_0;
					weights_0.resize(vertex_num);
					Vector<Color> weights_1;
					weights_1.resize(vertex_num);
					int32_t weights_8_count = JOINT_GROUP_SIZE * 2;
					for (int32_t vertex_i = 0; vertex_i < vertex_num; vertex_i++) {
						Color weight_0;
						weight_0.r = a[vertex_i * weights_8_count + 0];
						weight_0.g = a[vertex_i * weights_8_count + 1];
						weight_0.b = a[vertex_i * weights_8_count + 2];
						weight_0.a = a[vertex_i * weights_8_count + 3];
						weights_0.write[vertex_i] = weight_0;