So by investigating the issue with the console I can see that the mouseout event isn't firing when the mouse leaves the square div the shapes are contained within. Weirdly it only fires when the mouse moves through the vertical centre line of the div or when the mouse moves out of the div on the right edge. But even when that event gets logged the reset animation doesn't play, so something else is going on too. It also appears that each timeline only plays once, I'm guessing due to the same issue?
https://codepen.io/mrjonoces/pen/yLRMMYp?editors=1111