Access to invalidated Results objects/already opened on current thread with different schema

I have tried with One schema at a time approach.

async fetchData(options) {
    const { schema, filter, sort, schemaName } = options;{
          schema: [schema],
        }).then(realm => {
          let responseData = realm.objects(schema);
          if (filter) {
            responseData = responseData.filtered(filter);
          if (sort) {
            responseData = responseData.sorted(sort);

when I try to close the DB facing issue :Access to invalidated Results objects