No one deserves to be disrespected in the workplace.
Some people have tempers and end up saying something they regret. Maybe they don’t even mean it, but they were flustered in the moment and something slipped out that probably shouldn’t have. Most of us have moments like this every now and again, but it’s all about how you handle the aftermath. If you own up to your mistakes and aim to make them better, then nobody can fault you. But if you double down on something you know is wrong but are embarrassed to admit, then you need to do some inner work. You can usually make any tough situation better by apologizing and communicating through it. If you don’t do that, or don’t think to do that, then you need to live with the consequences of your actions.