Dear @Denny28,
Thank you for reaching out to the community again, I wasn't able to answer questions on the weekend.
First of all - Aufenthaltsgestattung applies to people who are allowed to stay in order to wait for a decision regarding their asylum claim. Did you mean Aufenthaltserlaubnis?
This answer might reach you too late, however, this is what my research has shown:
Generally, a residence permit can be extended. In order to extend any form of Aufenthaltserlaubnis - residence permit - in Germany, it is extremely necessary to apply for it before it expires. The local foreigners authority will check if the reasons why you received a residence permit in the beginning still apply to you now.
The BAMF also notes that it will be taken into account if the permit-holder has taken an integration course during their stay.
(Source: ****://***.bamf.de/EN/Willkommen/Aufenthalt/WichtigeInformationen/wichtigeinformationen-node.html)
Here is what the BMI says about residence permits:
"You must apply for a residence permit in person at your local foreigners authority four to six weeks before your current permit expires. For more information about the application procedure, please ask your foreigners authority."
It looks like your friend may face problems when trying to apply for the extension of his permit after it has already expired, as Germany considers their stay illegal.
You can share with us what happened or, in case problems arise, try and contact a local refugee support service for some legal advice. Here is a list of pro bono services (please choose your city/area): ****://***.refugeelegalaidinformation.org/germany-pro-bono-directory
All the best,
Isa