DynamicWidgets cause "The UI state is not consistent with the widgets mounted" error

We are using the latest version of react-instantsearch-hooks-web, with DynamicWidgets and custom refinement list widgets using useRefinementList.

Everything is working great, but when we use routing to set the search state based on the URL (for example /search?author=JK Rowling), we get an error message saying “The UI state for the index is not consistent with the widgets mounted.”.

Any way to make the combination of setting ui state based on the URL work when the refinementList widgets are wrapped in DynamicWidgets?