In the master brach should work by setting global `local_rport=yes` -- it is in core because the Via header is generated independent of uac module.
The event_route[tm:local-request] should be called for local generated requests, including the REGISTER requests from uac module. You can try to use add_local_rport() there, not sure it works for it, but worth testing.