I did not use any code to create the animation - just used Blender 2.93 and Mixamo. using the following steps.
1 : Imported your glb file into Blender.
2.: Arranged the model so it was in a TPose. (Mixamo - gives better results with TPose).
3 : Unparented all the meshes from the rig (detached the meshes from the rig).
4 : Exported all the meshes (only) to an .fbx file (Hide everything else in the scene - make them inactive).
5 : Uploaded this new .fbx file to Mixamo, set the control points that Mixamo wants (see image below), then added a Mixamo animation to the character.
6. Downloaded the animated .fbx file to my PC, then carried out the the actions that I posted here
7 : Then exported as a .babylon file
Here is the TPose fbx file I initially exported to Mixamo :
Lady fbx - use as you want
So no special coding - just using Blender and Mixamo.
Stay Safe, gryff
FBX in Mixamo