Automator Applescript inconsistently handling Google Chrome tabs

If an application is what you want, then the following example AppleScript code can be saved as an AppleScript application in Script Editor:

set myURLs to {"https://www.example.com", ¬
    "https://www.apple.com", ¬
    "https://apple.stackexchange.com"}

tell application "Google Chrome"
    activate
    close windows
    set winID to id of (make new window)
    tell window id winID
        set URL of active tab to first item of myURLs
        repeat with i from 2 to (length of myURLs)
            make new tab at end of tabs ¬
                with properties {URL:item i of myURLs}
        end repeat
        set active tab index to 1
    end tell
end tell