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

Array images;
	for (int i = 0; i < p_state->images.size(); i++) {
		Dictionary d;
		ERR_CONTINUE(p_state->images[i].is_null());
		Ref<Image> image = p_state->images[i]->get_image();
		ERR_CONTINUE(image.is_null());
		if (p_path.to_lower().ends_with("glb") || p_path.is_empty()) {
			GLTFBufferViewIndex bvi;
			Ref<GLTFBufferView> bv;
			bv.instantiate();
			const GLTFBufferIndex bi = 0;
			bv->buffer = bi;
			bv->byte_offset = p_state->buffers[bi].size();
			ERR_FAIL_INDEX_V(bi, p_state->buffers.size(), ERR_PARAMETER_RANGE_ERROR);
			Vector<uint8_t> buffer;
			Ref<ImageTexture> img_tex = image;
			if (img_tex.is_valid()) {
				image = img_tex->get_image();
			}
			Error err = PNGDriverCommon::image_to_png(image, buffer);
			ERR_FAIL_COND_V_MSG(err, err, "Can't convert image to PNG.");
			bv->byte_length = buffer.size();
			p_state->buffers.write[bi].resize(p_state->buffers[bi].size() + bv->byte_length);
			memcpy(&p_state->buffers.write[bi].write[bv->byte_offset], buffer.ptr(), buffer.size());
			ERR_FAIL_COND_V(bv->byte_offset + bv->byte_length > p_state->buffers[bi].size(), ERR_FILE_CORRUPT);
			p_state->buffer_views.push_back(bv);
			bvi = p_state->buffer_views.size() - 1;