Two bone IK For a separate aiming animation inside locomotion

There are many necessary parts that are uncovered in your explanation. Other than that, it’s not quite clear what exactly is going on, at least to me. But if I understood correctly, I think I can summarize the issue like this:

You want to apply IK on your rifle locomotion. Is that it?

If so, check when that Two Bone IK node of yours gets executed. It’s placement in the anim graph matters. For example, if that node is placed after your main locomotion, and plugged into the main out pose of your anim graph, the execution flow would surely need to pass through it. But if that’s plugged into the out pose of a state inside a state machine, there will be times that it won’t be executed. (that’s not a bad thing btw, you might also want to do that intentionally) So that might be the problem in this case.

But I can’t say anything much other than that due to the limited info. If that’s not the case, it would be very helpful if you could provide all the related parts of your blueprints along with a video demonstrating the issue. Also, please describe your expected result and the unexpected outcome that we should be paying attention to in your video. If you’re not able to upload such a video on this platform, you can upload it to YouTube and send it’s link.