If your pistol is a skinned mesh, it needs to use the exact same skeleton as the character, using Master Pose Component.
If your pistol is a static/rigid mesh/assembly, it needs to be attached to a socket (or direct to a bone) of the skeleton of your actual character.
Many marketplace assets do tricks like “a copy of the skeleton, that happens to animate exactly the same” which doesn’t actually work once you start driving the animations more procedurally.
