The source address is selected in the usual way, i.e. based on the available addresses and routes.
That is also how you can change it. E.g. put a preferred address in a route table entry that matches this usage.
I think it will also work when you set nexthop-choice=force-self in the BGP Peer definition.
At least that is what I routinely do and I notice it always uses the address of the BGP link as source address.
When that is not what you want, well, the way you do it now should work.