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;
        Realm.open({
          schema: [schema],
        }).then(realm => {
          let responseData = realm.objects(schema);
          if (filter) {
            responseData = responseData.filtered(filter);
          }
          if (sort) {
            responseData = responseData.sorted(sort);
          }
          resolve(responseData);
          realm.close()
        })
        }

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