### Godot version

0810ecaafdbee3ea747219e6ab3a8de5d2216a09

### System information

Windows 11, Nvidia 3000, firefox

### Issue description

Exporting the gltf file is corrupt in blender.

### Steps to reproduce

1. Open project.
2. Export as glb
3. Open in blender
4. Blender display many warnings

![image](https://user-images.githubusercontent.com/32321/216740742-de662c5c-f5c3-44b5-a36e-8ad33defdbba.png)


### Minimal reproduction project

https://cdn.discordapp.com/attachments/598003845657788438/1071249610896580691/Test_Game_Project.zip


Ref<Texture2D> metallic_texture = base_material->get_texture(BaseMaterial3D::TEXTURE_METALLIC);
			BaseMaterial3D::TextureChannel metalness_channel = base_material->get_metallic_texture_channel();
			Ref<Texture2D> ao_texture = base_material->get_texture(BaseMaterial3D::TEXTURE_AMBIENT_OCCLUSION);
			BaseMaterial3D::TextureChannel ao_channel = base_material->get_ao_texture_channel();
			Ref<ImageTexture> orm_texture;
			orm_texture.instantiate();
			Ref<Image> orm_image;
			orm_image.instantiate();
			int32_t height = 0;
			int32_t width = 0;
			Ref<Image> ao_image;
			if (has_ao) {
				height = ao_texture->get_height();
				width = ao_texture->get_width();
				ao_image = ao_texture->get_image();
				Ref<ImageTexture> img_tex = ao_image;
				if (img_tex.is_valid()) {
					ao_image = img_tex->get_image();
				}
				if (ao_image->is_compressed()) {
					ao_image->decompress();
				}
			}
			Ref<Image> roughness_image;
			if (has_roughness) {
				height = roughness_texture->get_height();
				width = roughness_texture->get_width();
				roughness_image = roughness_texture->get_image();
				Ref<ImageTexture> img_tex = roughness_image;
				if (img_tex.is_valid()) {