### 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 = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
		}
		importer_mesh->add_surface(p_mesh->surface_get_primitive_type(surface_i),
				array, p_mesh->surface_get_blend_shape_arrays(surface_i), p_mesh->surface_get_lods(surface_i), mat,
				mat_name, p_mesh->surface_get_format(surface_i));
	}
	return importer_mesh;
}
Error GLTFDocument::_serialize(Ref<GLTFState> p_state, const String &p_path) {
	if (!p_state->buffers.size()) {
		p_state->buffers.push_back(Vector<uint8_t>());
	}
	
	_convert_mesh_instances(p_state);
	
	Error err = _serialize_cameras(p_state);
	if (err != OK) {
		return Error::FAILED;
	}
	
	err = _serialize_skins(p_state);
	if (err != OK) {
		return Error::FAILED;
	}
	
	err = _serialize_meshes(p_state);
	if (err != OK) {
		return Error::FAILED;
	}