Duplicate accounts after migration from owncloud and domain rename

I have done a major upgrade/migration form version owncloud 6.0.4 -> 6.0.9 -> 7.0.15
7.0.15 => 8.0.16 => 8.1.12 => 8.2.11 => 9.0.11
Migrate to nextcloud 9.0.58 and upgrade to 10.0.6.
I have also change the domain for the service from owncloud.domain to nextcoloud.domain.
I face a user duplication error in sharing as shown in picture.

Can you please help?

thanks
Andry