When someone consistently demonstrates that they do not value you or your input, it is time to go.
Not time to think about going, not time to talk about going, just time to go.
Understand that people who are insecure or fearful will often downplay the contributions of others. This is a problem within themselves, not with you.
When their words or behavior show that they are in that place, your staying will not change it.
That is something they need to change within. Before that, their behavior will remain toxic, and a waste of your time and energy.
Your time and energy are precious resources - protect them always.