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


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