Thanks for the reply, Pfeil.
Since I use separate profiles for each aircraft in DCS, your solution would not switch back the original profile for me.
However it did give me an idea: use Alt-Tab as a hotkey to check if DCS is not active, and then just disable all of VA's Listening/KB/Mouse/Joystick input monitoring.
I used a loop to wait until DCS is active again to resume VA's own actions.
This way, the active profile need not be changed.
Here's what I did:
Set text [dcs] to 'DCS.exe'
Pause 0.5 seconds
Begin Text Compare : [{PROCESSFOREGROUND:dcs}] Equals '0'
Stop VoiceAttack listening
Disable Hotkeys
Disable Mouse Shortcuts
Disable Joysticks
Start Loop While : [{PROCESSFOREGROUND:dcs}] Equals '0'
Pause 0.5 seconds
End Loop
Start VoiceAttack listening
Enable Hotkeys
Enable Mouse Shortcuts
Enable Joysticks
End Condition