“Our doctor mentioned toddler potty training regression when I told him about our potty trained toddler having accidents on purpose. What should I do if he does have regression?”

Potty training regression is normal. Consider that children’s learning is not linear. They sometimes get stuck or may even go backwards depending on other skills they may need or depending on what is going on in their life.
There could be very different reasons for your child to have more accidents: changes in his routine, illness, or an emotional event. The important thing is that you don’t shame him whenever he has an accident and that you remind him to ask for the potty when he needs to wee. Do not punish him when he has an accident. Give him praise when he is successful.
You mention that your toddler is having accidents in purpose. I am not sure what makes you think that he is doing it on purpose. Think that toddlers don’t usually have the mental ability to do things to annoy us. So, I very much doubt that he is having accidents on purpose. It is important that you are clear about this, otherwise potty training may become a power struggle between you and your toddler, and this is something that you should avoid.
You may find these articles useful:
How Many Potty Training Accidents Are Useful?
Tips for Potty Training a Girl
I hope this information helps. I wish you and your little one all the very best.
Love,
Ana