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

Color weight_1;
						weight_1.r = a[vertex_i * weights_8_count + 4];
						weight_1.g = a[vertex_i * weights_8_count + 5];
						weight_1.b = a[vertex_i * weights_8_count + 6];
						weight_1.a = a[vertex_i * weights_8_count + 7];
						weights_1.write[vertex_i] = weight_1;
					}
					attributes["WEIGHTS_0"] = _encode_accessor_as_weights(p_state, weights_0, true);
					attributes["WEIGHTS_1"] = _encode_accessor_as_weights(p_state, weights_1, true);
				}
			}
			{
				Vector<int32_t> mesh_indices = array[Mesh::ARRAY_INDEX];
				if (mesh_indices.size()) {
					if (primitive_type == Mesh::PRIMITIVE_TRIANGLES) {
						
						const int is = mesh_indices.size();
						for (int k = 0; k < is; k += 3) {
							SWAP(mesh_indices.write[k + 0], mesh_indices.write[k + 2]);
						}
					}
					primitive["indices"] = _encode_accessor_as_ints(p_state, mesh_indices, true);
				} else {
					if (primitive_type == Mesh::PRIMITIVE_TRIANGLES) {
						
						const Vector<Vector3> &vertices = array[Mesh::ARRAY_VERTEX];
						Ref<SurfaceTool> st;
						st.instantiate();
						st->create_from_triangle_arrays(array);
						st->index();