Also it's almost explicitly stated in the text that even during the Clampdown, Ratchet due to his status as CMO has always had the freedom of movement and the ability to pick and choose who his patients were minus whoever the Prime was.
In fact, barring the actual Council, Ratchet was the one with the highest authority in the Cybertronian medical community. He literally didn't have to do much but do his actual job if he genuinely wanted a clinic to be built in Dead End. In fact, if he genuinely cared about the autonomy of his patients he would have done his job and did the thing he was hired to do.
Once you center Ratchet in the narrative through the lens that he's a person with the highest authority in the Cybertronian Medical Community instead of an Average Doctor like he tries to portray himself as, his hypocrisy is pretty obvious in his actions or lack thereof, but Ratchet's contradictions can easily be summed up by something he himself says:
"Why are we here, on this planet? We're here to save lives. Now okay, maybe we're talking mass numbers, a global scale of species saved, but me, I take it one life at a time."
He is a guy that ultimately wants to have his cake and eat it too. He wants to feel like a good person, and be praised for being one, but Ratchet as a character isn't like Rung where he'll put himself on the line for his patients come hell or high water, or like Pharma who will try to take what he feels is the least terrible option for everyone involved long term.
Ratchet is a character who has strong feelings about and for the people within his immediate vicinity, those he knows well. He is one of those people who feel like issues like politics and community problems are very vague and at most he'll do what he feels gets an immediate result that makes him feel better as a person, up until the issues affect him and his, and then it becomes personal.
And until it becomes personal Ratchet won't do anything he feels could put him at personal risk.
That's why in my opinion, Ratchet's line of questioning and his actions during the Delphi arc make a perfect amount of sense, because Ratchet isn't talking to Pharma as a doctor like Pharma is trying to appeal to, he's taking Pharma's actions as a betrayal of his best friend, someone who based off of JRO's interviews was pretty much a guy who held himself up to even higher professional and personal standards than the rigid ones he set for other people.
I wouldn't be surprised if Ratchet unintentionally put Pharma on a pedestal, or his memory of the mech had gotten rosy over the years, but either way he wasn't speaking to Pharma as a medical professional in any sense of the word.
But also that makes Ratchet's hypothetical of what he would do if he was put in Pharma's situation a complete lie, because we, the reader even if we didn't realize it, already know what Ratchet would do in Pharma's situation, because Ratchet was in that situation with the Functionists long before the Autobots were a thing, and we already know what ended up happening- Ratchet didn't try to do anything until it got personal, not out of professional or moral obligation, but because past a certain point Ratchet can't help but see statistics instead of people, and he doesn't care about statistics.
But we also see repeatedly that Ratchet despite his cynical behavior, canonically sort of latches onto nostalgia and people with idealistic dreams very easily, as opposed to people that aren't easy to understand or get along with. Because at the end of the day, Ratchet is again, someone who "goes with the flow". It isn't easy to get him to pick the hard choice.
Which makes the dynamic we see in the comic between Ratchet and Pharma vs Ratchet and Drift make sense when you think about it that way:
Drift is someone who Ratchet can ignore the sordid past of, because everything about Drift from his aesthetics to his beliefs, even his weaponry, evokes a nostalgia, and he's idealistic and young enough to be endearing, easy to get along with, and the romance between them is almost cliche enough to be called a fairytale, it's something really hard for Ratchet to let go of.
Pharma on the other hand is someone who was never easy to get along with in the first place, a workaholic teetotaler with high standards for everything and even higher standards for himself, the medical feats he accomplished bordered on theatrical, almost miraculous. Ratchet knew him for years but hasn't seen him in forever, and now he has to deal with the reality that his best friend is someone he no longer recognizes in the worst way possible, and it was simply the natural conclusion because allowing Drift to cut Pharma's hands off, not looking for him, giving up, walking away with First Aid, Ambulon and encouraging the black and white narrative that Pharma was simply a bad person allowed Ratchet to have his cake and eat it too.