Nav menu not going back to initial state

so i was working on my nav menu added a lottie animation but when i click on my nav menu it works fine but when i click on a nav link it doesnt go back to its initial state can anyone help me with it… its like my first project