Or what about a gender critical female doctor refusing to treat a trans woman?
There is nothing in Muslim beliefs to stop a Muslim doctor treating Jews. There is nothing in trans beliefs to stop them treating gender critical women. These are all straw man arguments.
It is clearly not acceptable for a medical professional to refuse to treat a patient in need of urgent medical care regardless of their protected beliefs. If we move away from life threatening situations, it becomes less clear where the courts would draw the line. And that is what matters. You may disapprove of someone's beliefs, but any protected belief must be respected.
And as I've said, this is an irrelevant rabbit hole. Continuing this discussion is pointless.