VR Expansion Plugin

Look at the gunbase on the left hand side in the blueprint editor there is an interface function override for the WantsToSocket function, the object tells the hand on release if it wants to slot into anything. I would SS it for you but I am compiling 4.26 again.

You can also manually call DropAndSocket to drop it and attach it to anything that you want, the WantsToSocket pathway is just the default OnRelease method.