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

if (d.has("name") && !String(d["name"]).is_empty()) {
			mesh_name = d["name"];
		}
		import_mesh->set_name(_gen_unique_name(p_state, vformat("%s_%s", p_state->scene_name, mesh_name)));
		for (int j = 0; j < primitives.size(); j++) {
			uint32_t flags = 0;
			Dictionary p = primitives[j];
			Array array;
			array.resize(Mesh::ARRAY_MAX);
			ERR_FAIL_COND_V(!p.has("attributes"), ERR_PARSE_ERROR);
			Dictionary a = p["attributes"];
			Mesh::PrimitiveType primitive = Mesh::PRIMITIVE_TRIANGLES;
			if (p.has("mode")) {
				const int mode = p["mode"];
				ERR_FAIL_INDEX_V(mode, 7, ERR_FILE_CORRUPT);
				
				
				static const Mesh::PrimitiveType primitives2[7] = {
					Mesh::PRIMITIVE_POINTS, 
					Mesh::PRIMITIVE_LINES, 
					Mesh::PRIMITIVE_LINES, 
					Mesh::PRIMITIVE_LINE_STRIP, 
					Mesh::PRIMITIVE_TRIANGLES, 
					Mesh::PRIMITIVE_TRIANGLE_STRIP, 
					Mesh::PRIMITIVE_TRIANGLES, 
					
				};
				primitive = primitives2[mode];
			}
			ERR_FAIL_COND_V(!a.has("POSITION"), ERR_PARSE_ERROR);