It sounds like gaslighting to me.
Sarcasm can be mean-spirited and passive-aggressive. But this...sounds like they are intentionally trying to make you doubt yourself.
Don't put up with that kind of behavior from anyone. Ever.
Gaslighting Definition, Techniques and Being Gaslighted - Emotional-Psychological Abuse - Abuse | HealthyPlace