I am using the exact macro you provided above without editing.
MacOS Mojave, Google Chrome Version 69.0.3497.100, KM 8.2.4
You are right, it fails when the macro is trigerred from the Chrome window.
There is another scenario that fails:
Chrome 1st window is opened in main screen
Chrome 2nd window (which containts the target URL) is opened in 2nd screen
Trigerring macro from 3rd screen from any other app makes the Chrome tab active but doesn't make the 2nd Chrome window active.
I guess finding 1st, 2nd, 3rd etc browser window OR incognito window and make it frontmost would solve my question.
It does work, finds and brings a tab with the target URL frontmost but it doesn't make the Safari window with the target URL active.
As you previously said - Chrome is broken and and it's not possible to activate a window with searchable tab so i am wondering is Safari also broken or we need to modify the script? As the script doesn't activate the window after selecting a tab.
I don't know if something in the macOS and/or Safari has changed, but it used to work fine. The code to bring the Safari window/tab active is already in the script, at the bottom:
if (winTitle ≠ "") then
tell application "System Events"
tell application process "Safari"
set oWin2 to first window whose name is winTitle
set focused of oWin2 to true
tell oWin2 to perform action "AXRaise"