If you've set VoiceAttack up to accept hotkeys 1-4 for your game or app and you press keys 1-4, those keys are going to invoke the command no matter what window is focused (this is the main idea behind having a hotkey, and what it's designed to do).
If you want the commands to not run if the game or app is not in focus, you're going to need to edit each command and set the, 'send commands to this target' and target your game or application's window. You'll then also want to check the box labeled, 'Stop command if target window focus is lost'. This will prevent the command from actually running if the game or app is not in focus.
Hope that helps!
Edit - I can see in one of your many images that you've done just that. That means that whatever window you're targeting is not the right one. You'll probably need to do some kind of wildcard in the place of the window title. I'd start with, '*elite*' (that is, replace 'Elite - Dangerous (CLIENT)' with '*elite*').