How to sync different user from two different Idp by same email address

I have a problem to login the different applications which are authenticated by KeyCloak. The background is: the internal users are stored in both Azure AD and ADFS server. One application is authenticated by KeyCloak which federated to Azure AD, and another application is authenticated by KeyCloak which federated to ADFS. The usernames returned from Azure AD and ADFS is different, but email is the same.
So when I login to one application, I can’t login to another application in same browser. It will show this message " You are already authenticated as different user". So I just think if there is any method to configure the authentication flow to sync the different users which have the same email. Thank you.

Are the email addresses set as the keycloak ‘username’?

It’s different KeyCloak username from AAD and ADFS. From the AAD, the email is set as a KeyCloak username. But from the ADFS, the employee num is set as a KeyCloak username.