LaunchBar does the same thing.
It used to have application-focus when its window was in focus, but in their infinite wisdom the devs changed that several years ago – and destroyed much functionality (from my point of view).
The old way allowed me to have LaunchBar-specific macros, and it did NOT interfere with my app-specific macros when LaunchBar was in focus.
I’m still chapped about that.
AppleScript and System Events can detect whether Alfred’s window is open or not:
tell application "System Events"
tell application process "Alfred 2"
if subrole of windows = {"AXSystemDialog"} then
beep
end if
end tell
end tell
-Chris