Here's an example: https://codesandbox.io/s/elegant-minsky-wwfko?file=/src/index.js
Close the error report window then click "retry". That will remount the Posts component but it will error immediately.
If you uncomment the queryCache.clear() it works.
I would expect that errors are not cached, or that they're cleared when the component is remounted.
My guess is that since the component never officially mounts, there's some edge case here that isn't accounted for, or that this is an intractable problem and I should just always clear the cache on an error (which may very well be a good idea anyway).