I am facing the same issue, when I add the class to the element the class is add, but animation don't work.
gsap.to(document.querySelectorAll(".prev i.animation"), {
keyframes: [
{
duration: 0.2,
x: -5,
},
{
duration: 0.5,
x: -3,
},
{
duration: 0.2,
x: -5,
},
{
duration: 0.5,
x: 0,
},
],
});