It looks like the culling of unused (well, apparently not fully unused ) TransformNodes is an intentional behavior for ImportMeshAsync with .babylon files.
We could instead keep the TransformNodes that are used as bones for any of the meshes in the hierarchy. But I’m wondering,
What if the TransformNodes of the bones are not descendants of the target mesh to import?
For example, what should happen if you import the elf mesh from Elf.gltf, whose skeleton uses nodes that are not descendants of elf?
Aw, sorry I forgot about this one. FYI: I switched to the GLTF exporter because it turned out to be faster and prduces much less data.
Also, it was actually super easy to build everything back together myself. It is really all about assigning or reparenting. Babylon does the rest. So I did not really need ImportMeshAsync anymore.