The armature moves from the origin if the animation changes. I tried moving it back, applying transformations, and inserting keys with location and rotation. Always jumps back to another position. I tried moving it into the origin then export into glb. It jumped back away from the origin again.
There was damage done to the armature by an import of another model. the model contained an armature. I deleted the actions except one. Then with the remaining action I deleted all keys. This stopped the armature from moving positions.