A cloud-based identity and access management service for securing user authentication and resource access
The Azure AD Provisioning service reads data about users and groups via AAD Graph. When a user is soft-deleted(ie: in the Azure AD recycling bin), it is returned via AAD Graph/MS Graph with the ObjectId value prepended to the UserPrincipalName value. Your mapping is flowing UserPrincipalName -> userName, hence the observed change. This is expected behavior, and if you are seeing it inconsistently please open a support case via portal.azure.com to receive assistance in determining the cause of any unexpected behavior.