Currently, I am developing a game that is similar to the concept of . In my game, I have implemented both dark and light themes along with animations that are triggered when the API sends a response (such as flipping a div and changing the background color upon matching a letter). However, I have encountered an issue where switching between dark and light themes causes the entire application to remount, resulting in all animations retriggering. How can I change the theme from dark to light or light to dark without causing the animations to replay? My application is built using ReactJS and MUIV5.