When a professor commits scientific fraud, are the journal reviewers and editors of the paper also discredited?
A note about the nature of academic fraud: Merely being wrong is not fraud.

In the case where something is indeed fraud, it will depend very much on the paper in question - it would only discredit the reviewers and authors if there is the reasonable expectation that they could catch it.

Consider some examples:

Fraud by Omission: You run a study twenty times, and report the one version that gave you a significant outcome. That study is well-conducted and correctly analyzed - it just also happens to be cherry picked. How could a reviewer know that?

Fraud by Modification: You alter your data in some way to give you a desired answer, and then re-analyze it. This analysis is done correctly, you provide the reviewers with this "raw" data and they reach the same conclusions, etc. There are some mistakes you might make that could alarm a very alert reviewer, but it's also possible, being aware of these mistakes, that you wouldn't make them.

Similarly, if you edit some figures, reviewers might catch egregious versions, but some people are caught out by things like particular artifacts in the image files, which is not something to necessarily expect the reviewers to catch, or even necessarily to have seen (as sometimes we don't get the raw figures, but versions processed by the editorial software).

Fraud by Just Outright Lying, Absurdly Unethical Studies, etc. Most of the vaccine denial literature falls in this category. Deliberately misleading statistics, results not supported by the data, etc. These I do expect reviewers to catch, and do think less of the journals that let them go into print.