Hi @Micky
As you have a lawyer, that is the person best placed to inform you about what your options are. Here we can only provide some additional information that may help you better understand your situation.
In German immigration law, a person wishing to stay longer-term in Germany requires the appropriate visa before coming here, e.g. a study visa to come to study, a family reunification visa to come and live with family members. If a person comes without a visa and tries to stay longer, then they are generally told they have to leave the country and get a visa. The authorities have to disregard this rule, however, if it is unreasonable to require someone to leave. You’ll find the legal basis for this in paragraph 5, section 2 of the immigration law (Aufenthaltsgesetz):
https://***.gesetze-im-internet.de/englisch_aufenthg/englisch_aufenthg.html#p0095
It states that the visa requirement must be waived “if special circumstances in the individual case concerned render a subsequent visa application procedure unreasonable”.
The law does not further define what is reasonable and unreasonable when requiring someone to get a visa. Your lawyer has made representations about your partner requiring your assistance after giving birth. It could also be important to point out the welfare of your child and the negative effects on them if you are obliged to be separated from them for a lengthy period at such an important stage of their life. There have been various court decisions on this question of reasonableness when there is a parent/child relationship.
You need to speak to your lawyer about what options are available to you and their potential consequences and costs, for example to write an appeal (Widerspruch) if your application for a residence permit has been turned down, or to file a lawsuit (Klage) with the administrative court if your appeal has already been turned down.
Best,
Éanna