What can I do to make the hand hold the grip of the gun even while the character is bending downward or upward?

In the documentation of Unreal Engine for virtual bones they don’t specifically use an aim offset, and they add a Layered Blend per Bone and Apply Additive together. In my setup, I have a problem understanding whether I need to create another Layered Blend per Bone and an Apply Additive node, and even if I create those new nodes, how should I connect the new nodes to my first setup?

Here the Layered Blend per Bone that is connected to the aim offset is using the branch filter for blend mode, but the Layered Blend per Bone under it uses the blend mask for blend mode, so firstly, I don’t know if I need the new Layered Blend per Bone, and I also don’t know where to put it:

Are you sure Two Bone IK should be after the aim offset and not before it?

I tried the below, and it seems to be fixing it: