The president has been friendly for years with Ms. Pirro, whose ex-husband, Al Pirro, served as Mr. Trump’s Westchester County power broker in the 1990s before going to prison for conspiracy and tax evasion. Ms. Pirro, whose television career had stagnated, has watched her ratings rise as she became one of Mr. Trump’s most fervent on-air defenders.

But even Fox News, which has mostly stood by star personalities in past scandals, flinched last week after Ms. Pirro’s on-air remarks about Representative Ilhan Omar, Democrat of Minnesota, a Muslim who wears a hijab. “Is her adherence to this Islamic doctrine indicative of her adherence to Shariah law, which in itself is antithetical to the United States Constitution?” Ms. Pirro asked on her March 9 program.

Among those calling her comments prejudiced was a Muslim producer at Ms. Pirro’s own network. Several advertisers said they would no longer sponsor her show.

The network said Ms. Pirro’s remarks “do not reflect those of the network and we have addressed the matter with her directly,” though officials there have not elaborated on that discussion or what internal punishment, if any, was meted out.

Mr. Carlson has also faced scrutiny for offensive comments he made on a shock-jock radio program about a decade ago, which were recently published by the left-wing advocacy group Media Matters for America. Appearing on the “Bubba the Love Sponge” show, Mr. Carlson described Iraqis as “semiliterate primitive monkeys” and mused that “arranging a marriage between a 16-year-old and a 27-year-old is not the same as pulling a stranger off the street and raping her.”

Fox News has not issued its own statement on the Carlson matter. Mr. Carlson did not miss any of his regular network appearances this past week. On air, he thanked officials at Fox News for backing him, and portrayed himself as a target of a liberal “mob” intent on silencing conservative voices.