I think the solution here is to perform a sync_sso call after the avatar processing has finished, and not before. So the only people with broken avatars will be those who re-logged.
(Make sure to include the avatar force update flag, whatever it’s called)