Perhaps you are imagining less imperfect, less egotistical, less insecure scientists in a past Golden Age of Science. I for one have stopped believing such an era ever existed, or will ever exist. But I continue to believe that the scientific process will continue to serve humanity well despite the terrible flaws of us humans attempting to apply it. Yes, I
believe in the scientific process , that it will self-correct, that the attacks by bad actors and self-deluded participants will come out in the wash.
As a doctoral student I had a paper rejected because I didn't toe the dogmatic line of one prestigious reviewer (seriously, the review feedback lacked only the word "dogma"). Terrible, right? But this is a common theme over centuries as near as I can tell, and here we are, living in a magnificent future!
We will continue to benefit from the scientific process, despite all our individual flaws, and despite how easily we each fool ourselves (and sometimes others).