To resolve this issue, determine duplicate values and values that conflict with other AD DS objects. To do this, use one of the following methods.
Method 1: Use the IdFix Microsoft Azure Active Directory Synchronization Tool Error Remediation Tool
Method 2: Map an existing on-premises user to an Azure AD user
Method 3: Determine attribute conflicts that are caused by objects that weren't created in Azure AD through directory synchronization
For more information, you can check out this article - Duplicate or invalid attributes prevent directory synchronization in Office 365
-------------
Please mark as "Accept the answer" if the above steps helps you. Your suggestion will help others also !