Problem when setting up the reset client

Hello, we do not understand why the client reset does not trigger once the client automatic reset failed…

When we make a schema modification, we directly offer an update of our application in the stores and we force the user to update via an explanatory screen, then we deactivate and reactivate the sync via the app service atlas, but once all these actions have been carried out the user experiences a crash of the application because he has access to the app but without the syncronized data and he is forced to uninstall and reinstall the application otherwise it does not work.

your help would be welcome because despite our research and our various tests in order to set up the client reset we are at an impasse.

thanks in advance

const App = () => {
  const app = useApp();
  const handleSyncError = async (
    session: Realm.App.Sync.Session,
    syncError: Realm.SyncError | Realm.ClientResetError,
  ) => {
    if (syncError.name === 'ClientReset') {
      try {
        const path = realm.path;
        realm.close();
        Realm.deleteFile({path});
        Realm.App.Sync.initiateClientReset(app, path);
        realm = await Realm.open(realmConfig);
        realm.close();
      } catch (err) {
        console.error(err);
      }
    }
  };

  const realmAccessBehavior: Realm.OpenRealmBehaviorConfiguration = {
    // @ts-ignore
    type: 'downloadBeforeOpen',
    timeOut: 10000,
    // @ts-ignore
    timeOutBehavior: 'openLocalRealm',
  };
  const syncConfig: Partial<Realm.SyncConfiguration> = {
    flexible: true,
    newRealmFileBehavior: realmAccessBehavior,
    existingRealmFileBehavior: realmAccessBehavior,
    initialSubscriptions: {
      update: (subs, r) => {
        subs.add(r.objects('User'), {name: 'User'});
        subs.add(r.objects('Contract'), {name: 'Contract'});
        subs.add(r.objects('Article'), {name: 'Article'});
        subs.add(r.objects('GiftCard'), {name: 'GiftCard'});
      },
    },
    clientReset: {
      mode: Realm.ClientResetMode.DiscardUnsyncedChanges,
    },
    onError: handleSyncError,
  };

  return (
    <RealmProvider sync={syncConfig} fallback={() => <Loader />}>
      <RestOfApp />
    </RealmProvider>
  );
};