A similar thing happened with our now 5 year old DD.

After going to swim lessons from around 6 months old she started to cry and not enjoy classes around 2 years old which coincided with her getting a new teacher she didn't like.

We didn't think there was much point distressing her when she clearly wasn't able to learn anything in that state anyway.

We stopped lessons for a term to give her a break. In the meantime we found another Centre with smaller group sizes (2-3 children per lesson) and after a short break we started with the new place and she has loved lessons ever since.