I'm trying to use the react-spring useTransition hook to toggle between an array of items and an extended version of the same array. The transition looks fine when expanding, but when transitioning back, the items get shuffled. Specifically, the last item in the old list moves to the first position while transitioning out. How can I prevent this from happening? I tried all combinations of the "reset" and "unique" options, modifying the original array instead of switching between two arrays, but nothing seems to help.
I found a similar issue at React-Spring useTransition shuffles my list items around but both the original and the "solution" sandbox are broken. Also just migrating to a newer version is not a solution for me.
Here is a working minimal example to show the problem : https://codesandbox.io/s/recursing-aryabhata-8u2ri