What is the best practice to attach the gun onto right hand but still allow it to be detached when needed?

Hi, I know it is pretty easy to just attach the gun skeletal mesh to hand. Just create a socket under hand_r and attach the gun to it.
However if I want to have some animations that require “switching hands” it gets a little complicated. For example if I am doing an AK reload, after the character uses left hand to insert the mag, the character switches to using left hand to hold the gun, and use right hand to pull the charging handle. In this process the right hand needs to detach from the pistol grip. How do I achieve that?

I’ve searched around and seen people mention using ik bones to achieve this. For example creating the socket under “IK_hand_gun” instead of actual right hand bone.
However how should I make ik_hand_gun bone follow hand movements? Is there a way to “constrain” this bone to right hand until it needs to be detached? Or should I ask the animator to export the ik_hand_gun movements completely independent from actual hand movements?

Thanks!