Frida Ghitis is a world affairs columnist for The Miami Herald and World Politics Review, and a former CNN producer and correspondent. The views expressed in this commentary are her own.

(CNN) If you want to fight corruption, elect a woman to office. Then everyone will decide that corruption is utterly intolerable and fight it until the bitter end.

Curiously, when men are in power, people find corruption much easier to tolerate.

Consider recent events in South Korea and Brazil, two countries where the first women ever elected president also became the first ever to be impeached and removed from office.

In fact, think also about the United States, and how Donald Trump, a candidate with a grimy ethical track record, was able to paint his rival, the first woman to lead a major party ticket, as the corrupt one.

Friday, South Korea's Constitutional Court formally removed President Park Geun-hye from her post, saying she had "betrayed the trust of the people." Her presidency, the court said , "cannot be tolerated for the sake of protecting the constitution."

To be sure, the toppling of now-former President Park is a step forward. Corruption is like gangrene that poisons democracy, business and society. But it's remarkable how the country's legislators found their moral outrage at precisely this moment, when the country was led by a woman for the first time in its history.

The legislature indicted Park last December over accusations that she had been overly influenced by her (female) adviser, Choi Soon-sil, who heads a religious group and stands accused of soliciting bribes from large companies. Already, the heir to the mighty Samsung empire has been arrested in connection to the case.

JUST WATCHED Protester and police clash in South Korea Replay More Videos ... MUST WATCH Protester and police clash in South Korea 02:08

The scandal has rocked the country to its core, and it could have serious geopolitical ramifications. Park was a hard-liner on North Korea, and the opposition, which favors a different approach, may gain power when new elections are held within 60 days. The country is now on heightened military readiness in case North Korea makes a move during the crisis.

Again, it is a positive development when any country tries to uproot corruption, but the cozy ties between business and government in South Korea are nothing new. In fact, there is no sign that corruption became worse during Park's presidency. The country's Corruption Perception Index score was essentially unchanged during her tenure.

Elsewhere among the world's 20 largest economies, the G20, the only other whose president was removed from office in recent months was Brazil, where Dilma Rousseff was deposed also on corruption charges , which she denied until the very end. Rousseff was accused of altering the budget figures to make the deficit seem smaller in order to improve her 2014 re-election chances.

She was re-elected by a narrow margin, but her popularity collapsed amid an economic crisis and a growing, though unrelated, corruption scandal. Smelling blood, the opposition decided it could not countenance her ethical shortcomings and impeached her. Rousseff insisted she did nothing illegal.

Since she was booted out, Brazil has been roiled in a massive graft investigation, with dozens of lawmakers and other prominent figures prosecuted in connection with billions of dollars in kickbacks between businesses and politicians. So far she has not been directly implicated.

South Korea and Brazil have each launched impeachment proceedings in the past against male presidents. Brazil's Fernando Collor de Mello resigned before the impeachment trial could remove him from office. South Korea's Ro Moo-Hyun's impeachment was overturned by the court and he was restored to power. But it was each country's only female president who was removed from power through the impeachment process. And it is significant that while 17 of 20 heads of state of the G20 were male in the past year, 100 percent of those removed from power after impeachment were female.

Ethical standards among politicians also became a top issue in the US presidential election. It was quite appropriate that the Democratic candidate, Hillary Clinton, was closely scrutinized for her private email server, for possible connections between donations to the Clinton Foundation and her work as secretary of state, and for her decision to give highly-paid speeches to Wall Street.

But what is extraordinary is the extent to which the moralistic fire fell on her while the mountain of accusations against Donald Trump didn't seem to make a dent. Trump was facing multiple scandals, from his "Trump University" scam to the statement that he grabbed women against their will and a flurry of foreseeable conflicts of interest , which are turning into reality in this presidency.

JUST WATCHED Dilma Rousseff: 'I'm the victim of a great injustice' Replay More Videos ... MUST WATCH Dilma Rousseff: 'I'm the victim of a great injustice' 02:22

Recall the feverish chants of "Lock her up!" led by Michael Flynn, who resigned as Trump's national security adviser after just one month on the job following revelations that he lied about meetings with the Russian ambassador.

Now Flynn, who was so indignant over "Crooked Hillary's" supposed pay-to-play misdeeds, has just revealed that at the time he was leading the chants, he received $530,000 as a "foreign agent" in exchange for actions that "could be construed to have principally benefited the Republic of Turkey."

As for Trump and Flynn, it's hard to decide what is a more serious failing: knowing or not knowing what a top foreign policy adviser was doing.

The impression that there is a double standard at work is hard to miss. Scholars, it turns out, have studied it. In one experiment , they showed volunteers evidence of Medicare fraud by fictitious administrators, asking what the punishment should be. When the fraudster's name was "Jane," they recommended higher penalties than when the same violation was committed by "Jack."

Another study looked at actual ethical violations investigated by the American Bar Association. It found the ABA disbarred women more than twice as often as men for identical infractions.

Some researchers theorized the reason is that we stereotype women as having higher ethical standards, and then we penalize them for breaking the stereotype.

Follow CNN Opinion Join us on Twitter and Facebook

Or maybe society is just uncomfortable with women in positions of power.

Discrimination, it turns out, comes in many forms -- some blatant, some subtle. But perhaps the most sophisticated expression of prejudice is the one that comes couched in high-sounding proclamations of moral righteousness.

No, society should not lower the ethical standards for women. Rooting out corruption is more important than most people realize. The solution is to apply ethical rules implacably, to get rid of the double standard by making men abide by the same standards applied to women and to punish men just as harshly as we do women when they commit the same crimes.

Then we won't have to wait until women are elected to get rid of corruption.

Note: A paragraph was added after the original version of this article was published to include mention of prior impeachment proceedings in Brazil and South Korea.