No. Basic patient respect and an understanding that when you work in some fields where people are at their most vulnerable you cease to be the most important person in the room.
So if someone asks for a female clinician, and the only one available is a transman, and when that clinician attends the patient they object because they don't believe that the transman is actually female, you go back to "sorry, Dr X is female but now presents as male however you are not obliged to accept care from him. How would you like to proceed?".
Lets say you know that your friend's dad works as a surgeon and you're due to have a relatively minor procedure carried out under general anaesthetic. You specifically request that your friend's dad doesn't carry out the procedure because, no biggie - it just makes you feel uncomfortable. You're told that's fine. It wouldn't be a big deal if it was delayed.
You find out later that friend's dad threw a hissy fit at not being involved and carried out the procedure - I think we can all agree that you didn't consent to that? This is the same. If friend's dad jumped in because you were bleeding out and he was the only person available to help? Reasonable not to check your consent in an emergency situation.
There are already detailed rules about consent, and the differences between seeking consent in routine and emergency situations. It's only in the specific circumstances of same sex (not gender) care that there appears to be some tension and a willingness to attempt to mislead patients by some institutions and staff members. I believe this invalidates consent as it's generally understood and should be stopped.