Does the orthodontist do the mold for the retainer while the patient still has braces on?

Age/stage dependent. If it is a phase i ortho patient, in mixed dentition, i find it much better to make an impression a few weeks before deband. The few anterior maxillary braces can be sculpted off the model and a traditional hawley retainer made, ready to be placed on the day of appliance removal. If a full tx case, i remove apps, and use vacuum formed max retainer and possible lower, or bonded lingual 3-3.
Differs. Some orthodontists take molds with the braces still in place. Others prefer to remove all the braces before making retainers. Depends on the patient's individual problems and the preferences of the orthodontist. Both ways work just fine. Follow your orthodontist's advice.
Sometimes. I prefer to take the retainer impression after the braces are removed. However, when i really worried about relapse i will take the impressions with the braces off so that the retainers will be ready when the braces come off.
No. The impression for your retainers are not taken until you're completely finished with your orthodontic treatment and only after all the brackets, bands, arch wires, cement are removed and after your teeth have been polished.
No. The orthodontist does the mold right after the braces comes off. He then has you come back a couple of hours later for the retainers.