How to Prevent Keystroke Sent to Focused Window, with Action "While Key is Down Do Actions"?

As per title say, how can I prevent keystroke being sent to active window when I use "While Condition 'key X is down' Met Execute Actions".

This question is related to my other macro group that utilize this action to keep resizing window when specific key pressed.

Resize Right (D) Wider Macro from Macro Group 'Window Resizer Mode'

Thanks before!