FYI,
I filed a tiny patch for ansi-osc.el which applies `downcase` to the result of `(system-host)` in order to match the behavior obtained when parsing the URL extracted from the comint output.
#68632 - [PATCH] Downcase host name to match URL parsing behavior - GNU bug report logs
debbugs.gnu.org
Regards,
Brad