Apologies for the delay in answering this query. As I understand your issue is users are synced as johndoe@onmicrosoft.com instead johndoe@jaswant .com.
When you synchronize your on-premises directory with Microsoft 365, you have to have a verified domain in Azure Active Directory (Azure AD). Only the User Principal Names (UPNs) that are associated with the on-premises Active Directory Domain Services (AD DS) domain are synchronized. However, any UPN that contains a non-routable domain, will be synchronized to an .onmicrosoft.com domain.
Would like to understand did you verify your domain in Azure AD/O365 ?
Refer to this article about the steps how to verify the domain - https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/add-custom-domain
Let me know if you have any questions.
Please remember to "Accept Answer" if answer helped, so that others in the community facing similar issues can easily find the solution.