Galileo comes to mind as someone persecuted during their time but later considered a hero. There's no shortage of other examples.
So we're giving the benefit of the doubt to members of the most notoriously cut throat agency in the American government now?
Mind you, calling someone a hero cost you next to nothing in utility so I think the choice is a no brainier.
I would like to live in the former, but you have to face reality: we do not live in such a society, we live in one where heroes like him will only be murdered, and no one will really care as it'll be forgotten quickly.
People who expose corruption don't always live to see the day their efforts make a difference. But the bad guys don't always win either.
People who express their homosexuality in Russia face repercussions. Someone who opposes racism such as black face in The Netherlands gets repercussions. Someone who leaks a video of war crimes faces repercussions. Expressing your support for these people likely has repercussions as well. They might not be opaque, but think about something as being put on a list (hello Tor Tails) or being bullied as two examples of repercussions.
I mean, murder is just one. There's one thing worse than murdering me, btw. Murdering my offspring, my child. In North Korea they got that one covered. Your whole family will suffer if/when you (attempted to) fled/flee. In our more civilized societies the repercussions are (much) less severe, but I don't believe there are none.
Also a friendly reminder that, for instance, Edward Snowden is hiding in Russia of all places from a possible death penalty.
Capital punishment for an ultimataly selfless act, motivated by his moral code and love for a country that very much would like to see him gone for good.
Selflessness just gets you walked over. Being good is both an individual positive for the hero and a collective gain for the people.
A scene in a A Bridge Too Far (ww2) shows an implementation of it. A soldier has a near-dead friend in his arms that he knows is alive, he dodged live rounds to keep his friend from a group of Germans in a forest clearing. He arrives at a MASH style base camp and seeks treatment from a doctor. The doctor is overworked and prejudges the friend to be dead, indicating that he should be left with the row of dead soldiers he was unable to save. The soldier demands treatment and when it is repeatedly rejected he pulls a gun on the doctor, threatening to kill him. The doctor eventually relents, treats the friend finding him alive. The soldier puts away his gun and capitulates to the punishment incoming to him for breaking the rules, the doctor reports him to the MP and manufactures a slap-on-the-wrist for the soldier. The doctor after having been exposed to near death and allowed the soldier to remain apart of the social system asks him "would you have shot me?". The soldier pauses and silently salutes.
That story would never have happened if it were not for the hero's ability to survive in a hostile environment and achieve his goal of returning alive with his friend, courage or not. The friend would never have lived if the doctor had not risked being vulnerable to having another death on his hands because of an arrogant soldier.
They both gave that friend a chance at creating something of enduring value from successful missions in the future and an everyday life for the friend himself.