Both charities and charity funders are considered complicit in the social impacts of that charity's output.
The company who made the breakfast of a rapist should be charged with the crime?
It is what a person does with that breakfast cereal not the cereal itself.
The company is not literally investing in the endeavor of the rapist, the teacher is not literally investing in the outcome of the killer, investors/funders literally expect the outcome of the thing they invest in to continue without ambiguity. These are much less fitting than the drug-dealer analogy.
I literally own tobacco company stock and accept that I am complicit in the sale of cigarettes, it's not much of a leap.