[BUG] Issue with a router redirection via react-router-dom
Describe the bug
AnimatePresence component doesn't update it's children after navigation through Redirect component or any other way of redirection , e.g. history.replace(). It causes a problem that the children is not displayed after the redirection. At the attached video you can see that after the redirection Switch component still has an old key, which is basically location.pathname.
You can also play with it on a sample demo project - https://codesandbox.io/s/framer-motion-with-react-router-redirect-issue-2q9b1.
Steps to reproduce
Click on redirect to / link in the bottom.
Expected behavior Children component is updated.
Video or screenshots

The issue is reproducible with framer-motion v1 as well as with v2. Also here are some related issues - https://github.com/framer/motion/issues/606, https://github.com/framer/motion/issues/466.
Dupe https://github.com/framer/motion/issues/466