That depends on the quality of the study. Wakefield, the OG vaccine autism guy, lost his license because he faked the data. He admitted to it under oath. It requires no epidemiological understanding to prove it. Real world data looks different under statistical analysis than made up data. His data was made up. In the trial they proved he made up the data and outed his motives for lying.
There are lots of quirks of numbers that will give you away. Go look up the 1 paradox how numbers generated by humans for any purpose are most likely to start with a 1, not an even distribution of the 9 digits.
Beyond that we would need to go case by case. Maybe the person deserved it maybe they didn't. I don't think the system is perfect. I already talked about how their slow adoption of new knowledge personally hurt me with leaky gut.
Look at Newtonian physics vs general relativity. Science advanced. Here is the thing though. People knew about problems with Newtonian physics. Sometimes it worked and sometimes the math wasn't quite right. General relativity wasn't just an opposition to Newtonian physics. In order to be adopted the math has to explain everything that Newtonian physics does equal or better and solve some of its problems. If your new solution doesn't fit with what we know to be true it gets thrown out right out of the gate unless you can also prove that other knowledge is wrong somehow.
Walk into a room of Mathematicians and declare 2+2+2=7 because 2+2=5 and 5+2=7. You'll get laughed out of the room and no one is going to call you a Mathematician anymore. They shouldn't. You made a basic mistake in mathematics and insisted you were right rather than saying oops when it turned out you didn't even have the knowledge you were trying to overturn right. Since this is medicine human safety is on the line and they should take your license just like that mathmatician shouldn't be allowed to calculate safe bridge loads and spans anymore.