Attorneys have a right to free speech, just like regular people. And protected free speech is not always nice speech.
Attorneys may have agreed to certain limits being placed on their First Amendment rights as a condition to being licensed in their state, but they do not give up their right to speak publicly about people when staying within those limits. State Bar Associations have rules of ethics and codes of professional conduct that could, should an attorney be in violation, lead to a reprimand or even disbarment, but violations would have to be exceptional for disbarment to occur.
In other words, the speech of the DA would have to be awfully egregious for the DA to be removed from the case or for the case to be dismissed based on the DA's remarks. Ordinary nasty name calling, and making fun of someone, would not generally do it.
I can think of four cases offhand where attorneys used rather "colorful" language which got them into a modicum of trouble with their State Bars. In California, a defense attorney in a courtroom called a prosecutor and a baliff "as$es" and then challenged the baliff to a fight. And a federal judge and an attorney general in Mississippi exchanged less-than-flattering comments about each other. There was a criminal defense attorney in Florida who wrote on his blog that a particular judge was an "evil unfair witch" and "seemingly mentally ill." And in Michigan, one of our more colorful attorneys likened a judge to "Hitler" and called judges "jackas$es" and said they should be sodomized.
Codes of Professional Conduct may consider it an attorney violation to use undignified, discourteous or disrepectful speech, because it "undermines public confidence in the integrity of the judicial branch and legal process, and impairs public respect for the rule of law." But this does not prevent an attorney from exercising his free speech rights and it does not, quite frankly, prevent an attorney from using undignified, discourteous or disrepectful speech.
The First Amendment protects most of the speech of most of the people most of the time. The protection can end, however, when criticisms and opinions become false and defamatory statements that injure a reputation. Then there is not only possible bar sanctions an attorney could face but a defamation action, as well.