You’re setting up a false dichotomy. There’s no one input that’s responsible for 80% of a successful education.
School funding is obviously dominantly important up to a point (they need books, rooms, teachers, etc.).
Past that point, marginally more engaged and educated parents are worth much more than a marginal $X of funding per student per year.
I went through a public school with a tri-modal distribution (that almost perfectly mirrored our county’s tri-modal income distribution). A handful of people dropped out functionally illiterate, most people came out “just fine” and went to a local community college or state school, and a handful of people went to top tier universities paid for by pell grants, scholarships and PLUS loans.
The main variable correlated to which modality you fell into was a combination of the socioeconomic status of your parents, and how engaged they were in your education (i.e. not going through a divorce, not rich but working 100 hours per week, etc.).
A passionate teacher or extracurricular sponsor (drama teacher, athletics coach) might have temporarily filled-in for or amplified this normally parental role for a year or two with a similar effect, but only for a couple students at a time. They would usually target their efforts on kids on the cusp of a modality (failing but with a lot of potential shown elsewhere, or very smart but from a troubled home).
There’s a study on kids that just barely missed the cutoff to get into the #1 public school in NYC. Their post-HS outcomes were indistinguishable from those on the symmetrical other side of the divide. On either side of the divide, you had parents encouraging and pushing their kids just as hard. Interpret from that what you will.
Basically, the world isn’t black and white. It’s damned complicated. Public school is complicated. Anybody who claims a simple solution, especially tied to funding or teachers, deserves suspicion IMO.