If you look in the gist that I linked to, you’ll see that when the user updates their xprofile info, I update their nicename from their first and last name.
I got it working, I was trying to use wp_get_current_user, which was using cached information, so I had to use get_userdata instead. Then I forcefully (search/replace) updated the url by replacing it in the $bp->displayed_user->domain.
I’ve also tried wp_cache_delete( 'bp_user_username_' . $user_id, 'bp' ); which didn’t work either.
I’ve also tried looking into changing it before it saves, via the xprofile_data_before_save hook, but not enough data gets passed to the function to update the nicename.