{{siteUrl}} not working on load
Try using {{ currentSite.baseUrl }}

I had the same issue when I started using environment variables instead of @web for my sites. I've found the above works for all cases.