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


buffer->put_32(text_chunk_length);
	buffer->put_32(text_chunk_type);
	buffer->put_data((uint8_t *)&cs[0], cs.length());
	if (binary_chunk_length) {
		buffer->put_32(binary_chunk_length);
		buffer->put_32(binary_chunk_type);
		buffer->put_data(p_state->buffers[0].ptr(), binary_data_length);
	}
	return buffer->get_data_array();
}
PackedByteArray GLTFDocument::generate_buffer(Ref<GLTFState> p_state) {
	ERR_FAIL_NULL_V(p_state, PackedByteArray());
	Error err = _serialize(p_state, "");
	ERR_FAIL_COND_V(err != OK, PackedByteArray());
	PackedByteArray bytes = _serialize_glb_buffer(p_state, &err);
	return bytes;
}
Error GLTFDocument::write_to_filesystem(Ref<GLTFState> p_state, const String &p_path) {
	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
	Error err = _serialize(p_state, p_path);
	if (err != OK) {
		return err;
	}
	err = _serialize_file(p_state, p_path);
	if (err != OK) {
		return Error::FAILED;
	}
	return OK;
}
Node *GLTFDocument::generate_scene(Ref<GLTFState> p_state, float p_bake_fps, bool p_trimming, bool p_remove_immutable_tracks) {