Gun Attachment stuck and lost {Video Link}

I think maybe your weapon is occluding?
kind of hard to tell based on just the description. Can you share a screenshot or 2?

Nvm. Just noticed the link. Need more coffee.

Anyway. The first thing you need to look into is IK.
Is it setup at all? No? Then setting it up will keep the rifle on the hands.

Second thing to look up. Enable debug view and check the bones.
The gun socket bone may be sliding because of the aim offset - looking over at what the bones are doing will show you in which way that is occurring.

Set the position in a way the issue is accentuated. Shift f1 to eject. Pan around to the front, and check where the bones actually are.
you can screenshot that for further debugging…