when federal prosecutors engage in misconduct-what happens?

There are occasions when lawyers working for the federal government engage in willful misconduct. Two examples I remember are:
Lawyers for the federal government fought for more than 10 years to keep the Kennewick Man away from researchers. They lost the case and the appeal. The judge in charge noted that the government engaged in a pattern of deception and on multiple occasions deliberately misled the court. He found that the government had acted in bad faith and awarded a couple of million dollars in legal fees to the winners. This month’s Smithsonian magazine has an article on the Kennewick Man. I also remember several lawyers sanctioned by the court for a long series of misconduct in the Senator Stevens ethics case Tables Turned on Prosecution in Stevens Case - The New York Times.
In that case the judge appointed a special prosecutor to determine if criminal charges should be filed against senior justice department lawyers.

So finally, my question. In practice what happens to a federal (or state but that may have 50 answers) attorney shown to have engaged in a pattern of misconduct? Does their boss tell them to be more careful next time? Do they get fired? Arrested? sent back to school? I assume it at least dents their career since it should be embarrassing. But I have never heard what happens to them.

IANAL so I don’t know what sanctions a lawyer might face.

Sanctions can come from the Bar, from the Court, or from the lawyer’s boss

The Bar can disbar, suspend for a period of time, or reprimand. The results are generally public. They can also privately chastise a lawyer for minor stuff.

The Court can impose monetary sanctions on the lawyer, or case-specific sanctions (throwing out the case, or defense, or instructing the jury that something improper happened and they can infer what they wish from that)

The boss can do what ever they want.

Federal district attorneys are also subject to impeachment and removal by Congress, though AFAIK none have ever been impeached.

Thanks.
I understand that impeachment is a serious issue, and before that happened the boss would probably intervene, but it would comfort me to know that people who have the largest say in whether a person goes to jail or worse have some controls on misbehavior. But we don’t always get what we want in this world.

thanks.
what bothers me is the “whatever they want” part. Sigh.

Not quite, in the case of a federal prosecutor. Certain civil service protections apply.