Holding key issue

How do I force a key release or fix this issue any other way? I want my character to be unable to aim while sprinting and it works just fine. However, if I hold aim key while sprinting and release it after I’m done sprinting, the game triggers the code to stop aiming even though I wasn’t aiming in the first place.

blueprint