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


if (d.has("name") && !String(d["name"]).is_empty()) {
			mesh_name = d["name"];
		}
		import_mesh->set_name(_gen_unique_name(p_state, vformat("%s_%s", p_state->scene_name, mesh_name)));
		for (int j = 0; j < primitives.size(); j++) {
			uint32_t flags = 0;
			Dictionary p = primitives[j];
			Array array;
			array.resize(Mesh::ARRAY_MAX);
			ERR_FAIL_COND_V(!p.has("attributes"), ERR_PARSE_ERROR);
			Dictionary a = p["attributes"];
			Mesh::PrimitiveType primitive = Mesh::PRIMITIVE_TRIANGLES;
			if (p.has("mode")) {
				const int mode = p["mode"];
				ERR_FAIL_INDEX_V(mode, 7, ERR_FILE_CORRUPT);
				
				
				static const Mesh::PrimitiveType primitives2[7] = {
					Mesh::PRIMITIVE_POINTS, 
					Mesh::PRIMITIVE_LINES, 
					Mesh::PRIMITIVE_LINES, 
					Mesh::PRIMITIVE_LINE_STRIP, 
					Mesh::PRIMITIVE_TRIANGLES, 
					Mesh::PRIMITIVE_TRIANGLE_STRIP, 
					Mesh::PRIMITIVE_TRIANGLES, 
					
				};
				primitive = primitives2[mode];
			}
			ERR_FAIL_COND_V(!a.has("POSITION"), ERR_PARSE_ERROR);