@Andrew Thanks for the help.
I use it in compatibility mode because I'm using Karabiner with keyboard shorcuts depending on the app.
I think it is a bug since the workflow behaves differently depending if it was triggered via alfred search or universal action.
You can reproduce it by:
creating a workflow with input keyword with argument (it doesn't need to trigger any action)
select any text on any app (eg. Google Chrome)
if you run the workflow via alfred search, it will give focus back to the app (as expected)
if you run the workflow via universal action (by activating it with cmd+option+.), the app does not regain the focus back
I noticed that I can press cmd+w to give focus back. But then the workflow will behave differently depending on how was triggered.
If there's a way I can know if workflow was triggered via universal action I can work with it.