This is both discouraging and messed up--I'm sorry you've been placed in this kind of position. It does at least sound hopeful that you can extricate yourself from the situation with a clear conscience and some decent research.
Regarding your PI's willingness to have his name on a paper that is at best highly questionable, one piece you might be missing is that PIs can be under incredible pressure to keep a good publication track record. If he doesn't have tenure, that's a given; but even if he does, grant funding is highly competitive. So he might be in a much more difficult spot than seems obvious at first, thus motivating him to cut corners that really shouldn't be cut. You're right that he should be mentoring you in how to conduct research in an ethical and transparent way...but...his department chair should be supporting him to conduct his research in an ethical and transparent way, the study sections reviewing grant applications should be too, and this is probably all not the case. "Your collaborators messed up" generally doesn't improve your percentile.
It doesn't excuse the behavior, but may help explain it.
Regarding how to deal with the issue--I wouldn't necessarily assume that being "anonymous" is much guarantee that your words here couldn't become known to everyone involved. Any one of the parties who happened to read through this would very likely recognize it. Those of us who aren't involved can't easily figure out who is whom--so at least the various parties can rest assured that they're not being convicted without an opportunity to explain their side of the story. But anonymity isn't the shield that it would be if this were some personal relationship issue. Academia is too small.
Thus, rather than taking advice from people anonymously but in public, I think the thing to do is talk to your program director if you have good reason to believe that the issue can be dealt with in confidence. There is only so much burden that is reasonable to expect you to bear, and depending on the department, it might be virtually assured that you can get the problematic publication flagged but would be committing academic suicide at the same time. It's the kind of thing that I'd tend to do reflexively, but objectively you probably will do a lot more good in the long run if you act defensively here: it really ought not be your responsibility to stick your neck out as a sacrifice to other people's wrongdoing. If the department is the kind of place where your concerns would be treated thoughtfully and your honest concern would be celebrated, then you have quite different options than you do if there are multiple tensions about to boil over and anyone who turns up any flame for any reason is liable to get burned.
Regarding the paper, it's bad, shouldn't happen, and yet it's hardly the first time that wrong stuff has appeared in Science, Nature, or Cell. If it's not too common, hopefully the actually correct results will come out soon enough and it will be slimy and wrong but without lasting negative impact on what humanity thinks is likely to be true. There are all sorts of options for getting the scientific record corrected, including someone (not necessarily you) contacting the journal editor to explain that open data is really important for this paper because there is reason to believe that sample mishandling or mislabeling has corrupted the results, or someone (not necessarily you) contacting competitors to tell them: hey, Whomever, M., Big Name Bio Journal (2023) was published with crappy data--don't rely on these results, assume they're probably wrong and check yourself.
But really, ideally, your program director would be your best contact. As a fallback, if you think he's also too likely to be heavily swayed by department politics, you could talk to whoever is in charge of teaching your scientific ethics course (unless it's any of the involved parties!). Most universities also have general-purpose resources for grad students with difficult issues like this, though it's really hit or miss about whether they're actually helpful or are there to put PR bandaids on anything that might generate bad publicity.
Best of luck! I hope the rest of your Ph.D. is not nearly so harrowing. It's hard enough without having to deal with all this!