As the title says.
The behavior is the same when I use the action in KM.
Looks like the window became inactive (switching to KM engine?) for the macro and then switched back active after the macro? With AppleScript trigger, it runs in the background, so no active window switch?
Yes, because the system activates Keyboard Maestro Engine to process the URL (just like it activates your web browser when you click an http: link). Keyboard Maestro Engine immediately deactivates itself.
Is it possible to make it run in the background to avoid the window flash?
This window flash behavior is not pleasant to the eye when I need to trigger macros frequently in a period of time. I turned to AppleScript trigger because of the window flash with "kmtrigger". (It's fine if nothing can be done with it since I've already been using the alternative triggers.)