### 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 = mat3d;
				}
				ERR_FAIL_NULL_V(mat, ERR_FILE_CORRUPT);
				mat_name = mat->get_name();
			}
			import_mesh->add_surface(primitive, array, morphs,
					Dictionary(), mat, mat_name, flags);
		}
		Vector<float> blend_weights;
		blend_weights.resize(import_mesh->get_blend_shape_count());
		for (int32_t weight_i = 0; weight_i < blend_weights.size(); weight_i++) {
			blend_weights.write[weight_i] = 0.0f;
		}
		if (d.has("weights")) {
			const Array &weights = d["weights"];
			for (int j = 0; j < weights.size(); j++) {
				if (j >= blend_weights.size()) {
					break;
				}
				blend_weights.write[j] = weights[j];
			}
		}
		mesh->set_blend_weights(blend_weights);
		mesh->set_mesh(import_mesh);
		p_state->meshes.push_back(mesh);
	}
	print_verbose("glTF: Total meshes: " + itos(p_state->meshes.size()));
	return OK;
}
Error GLTFDocument::_serialize_images(Ref<GLTFState> p_state, const String &p_path) {