The on-premises password hashes will overwrite the cloud password hashes for any users synced via AAD Connect that are in-scope for Password Hash Sync.
This documentation details how to enable selective password hash sync: [https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-selective-password-hash-synchronization
Depending on the number of users in each system, it may be a better option to force everyone to reset their on-premises passwords so that the authority can be fully turned over to on-premises AD without the management overhead of implementing the workaround feature in the documentation I linked.