The visa status should not prevent him from leaving Germany. Under normal circumstances, overnight stays can be punished, but for people who leave alone after a few days, that would at most be a fine. This makes the reaction of the border police puzzling. Are you sure that nothing has been lost in the translation?
The city of Munich writes:
- Before the visa expires, contact the KVR. He did it.
- He receives a certificate that is valid until the KVR reopens. That hasn't happened yet.
- If there is still no answer, he should send an email with scans of
- Passport and visa
- A confirmation from the hotel or host where he is staying.
- Proof that departure is impossible. (They don't say what that is.)
- If available, proof of health insurance.
So it seems that he did everything and the city administration can't keep up.
He should make sure that everything is documented correctly so that there are no problems with it Next one Application for a Schengen visa.
Although I understand that returning home could be a personal emergency for him, I would think that Munich is reasonably safe at the moment. Germany has more confirmed infections than Iran, but fewer deaths.