Use animation-play-staterather than removing the animation itself. This way the animation keeps its state and will continue from where it last stopped.
animation-play-state
animation-play-state: running; animation-play-state: paused;
https://codepen.io/ajosedev/pen/wvBaVja
[[animations]] [[css]]