ah yes, that's because you set window.location.href=
this can not be detected by the extension and because lightning is no official protocol no handler can be registered (the browser passes over to the OS)
as you use JS anyway you should do this:
if (window.webln && window.webln.lnurl) {
window.webln.enable().then(() => { window.webln.lnurl("....") });
} else {
window.location.href= "..."
}
use webln when available, otherwise do the redirect as currently.