As the saying goes, science advances one funeral at a time, but it does advance.
It seems overall you can still have an optimistic point of view of science while accepting it does not work as well as it could.
It's a race to the bottom, and how can we ask that people compromise the quality of their work to compete when the only motivation for doing this work is the love of the craft. It's certainly not the money, or the environment, or the work-life balance, or the prestige.
When in the trenches of science this is literally your job. What seems like the likely hypothesis, what model that explains the data is good or bad.
Papers are not textbooks. They are the boiling cauldron from with some bits eventually emerged as fully cooked facts.
The only way that I can square others' experience of science with my own is if they take the Discussion sections, which are free-form extrapolation about future directions, and treat them as if they were asserted as truth.
I'm talking about malicious, fraudulent results. Made up numbers, code obfuscated and manipulated to do things different from what's being claimed. I resent the implication that my issues stem from a naive, idealistic reading of the discussion section rather than a thorough examination of the methods.
Sorting the good from the bad is one thing, creating and evaluating models, good models or bad models is one thing. Having to compete AND CITE fraudulent work, lies, imaginary models to be able to participate in the system is not "literally" science. And it's not the job any self-respecting scientist should want to do.