i know that the opinion about the right to privacy and the respect of the shyness towards nudity of boys has changed a lot in recent times compared to the past, at least the 50's , 60's , and even 70's where a boy who was still a kid and even a male teenager was not considered generally by most of the adults, male or females, as needing to be respected as much as girls concerning the exposure in the nude.
It was true at school physicals, sports physicals and also at a doctor's office where he was very often told to undress completely even in presence of a mother and without having a gown unlike sisters
It means that a double standard was frequently applied in many situations and sometimes It was right to change that, sometimes it was a little stupid
For instance I believe always that a boy under 12 age needs to be accompanied when he went to a doctor by his mother or if more available his father.
at that age it is normal and cannot be too much embarrassing. Of course if the boy is more shy towards nudity than others and is bathing himself without any check of his mother since a few years, he will be embarrassed if the doctor, often a woman, sometimes assisted by a nurse, told him to remove or to pull down his underwear in front of them and his mother but he must overcome his embarrassment, his mother has seen him and cared at him when he was a baby and a little kid and he is not enough mature to answer correctly to some questions of the doctor and the presence of the mother is useful.
After 12 age, I believe that it is depending on families, and may be the choice of the boy.
I have read that some boys even aged of 15 or 16 want to be accompanied by their mother or their father. why not if it is their choice.
And of course if a boy aged between 12 and 16 age, may be even 18 age is seriously ill, I believe that it is better that he were accompanied by a parent.
it is only for routine physicals that he can be alone.