I managed to get through my school career without addressing my teachers as either Sir nor Miss. I didn't like the idea of subservience, as it happened, and when I was a teacher I didn't like to be addressed as Sir (or Miss!) either. I let it ride, though --- my identity doesn't depend on it.
Whether or not he believed that trans women are women, this doctor shouldn't have imposed his beliefs on his patient. He wasn't compelled to address his patient as Madam. All he had to do was not be rude. Even if the situation required an honorific, I cannot see how addressing the patient as Miss/Mrs/Ms Patient would have been a faith denying act for the doctor?
And in the doctor's notes, if he doesn't choose to adopt the patient's pronouns, there are circumlocutions enough in the English language to avoid both those pronouns and offence to the patient.
Being around people means learning to adapt to them. If a doctor wishes to be a healer she needs to come alongside her patient --- even if the patient has life stances which are very different to hers.