Export on Keycloak with large users

I want to export my Keycloak 21.0.2 with almost 300,000 users an import it in another Keycloak in another system. I run ./kc.sh export --dir exp. The exp folder generated with almost 6000 files named myrealm-users-*.json. But in import phase running ./kc.sh import --dir exp I found out that in some jsons I have duplicate users which fails the import phase.

Does any one have any suggestion? How can I solve this duplicate users?