That isn't the way the world - or most morality systems - work.
A surgeon who saves a thousand lives doesn't get a pass for the one murder they commit.
If the person who eventually cures cancer also happens to be a rapist, do you remember their name with awe or pity?
The sort of Felicific Calculus practiced by the "Effective" Altruists is a tawdry trick designed to excuse despicable behaviour.
And yet you've a convicted felon who vacationed on Epstein island sitting at the highest office in the land, or even in the world.
https://en.wikipedia.org/wiki/Scope_neglect