That’s not what this setting is for. It sets the Umbraco “application” URL, i.e. the URL for the Umbraco instance that’s running your site. Not the URL for the website itself.
Also ensure the UmbracoApplicationUrl is updated to the primary URL of your production environment, as this is used when sending emails (password reset, notifications, health check results, etc.).
Umbraco will pick this based on first request but for multilingual/domain/subdomain sites, or on azure, this may be wrong, which is why it’s required to set it explicitly for production.
This isn’t a workaround. This is how domains are assigned to content in Umbraco and is the correct way to ensure that .Url(mode: UrlMode.Absolute) returns the domain you want.