@nikivi, I think this should do the job for you.
See this test, example macro that fits your specific use case:
MACRO: TEST Make App Win FrontMost
It uses this Sub-Macro:
MACRO: Make App Window FrontMost Based on Name [Sub-Macro]
You will need to download both macros.
Please let us know if this works for you.