[react-instantsearch] connectStateResults and multiple indices stale results

I am encountering an issue with the allSearchResults showing possible stale results from indices later defined. I have created a codesandbox where you can reproduce this unexpected behaviour:

As you can see the set-up is as follows. An <InstantSearch> component instantiated with a main index. As a child component of this I have defined an <Index>component that is pointing to a secondary index.

As a child of <InstantSearch> there is a component that is wrapped in the connectStateResults HOC. In this component I am checking the allSearchResults property, retrieving the results for the given indices.

If you type a search query in the <SearchBox> you will see that the query for the secondary index lags behind the main index. In this case I focus only on the query property, but the resulting hits are also not as I expect.

Is there some way I can resolve this issue?

Seems like a known defect since november 2019. Github issue

I have forked the above sandbox and replaced react-instantsearch v6.4.0 with v5.7.0. The older version does not have this issue.