Hi @amas
Generally in such situations, it is required to leave the country and return with the correct visa.
An exception can be made for parents of young children. As young children are unable to understand a long absence from a parent, in such cases it can be seen as unreasonable to require the parent to go through the visa procedure.
There is no clear definition of how long an absence is acceptable and until what age a separation is considered unreasonable. If the Ausländerbehörde persist in requiring you to leave the country, you can take the case to the administrative court (Verwaltungsgericht). However, be aware that there have been different court decisions on this matter. You need to discuss in detail your options with your lawyer.
Has your lawyer made this point to the authorities? The rule is in paragraph 5, section 2, number 2, part 2 of the Aufenthaltsgesetz.
This article (in English via an online translation) gives a good overview on this issue:
https://***-advogarant-de.translate.goog/rechtsanwalt/gebiete/rechtsanwalt-fuer-internationales-recht/nachholung-visumsverfahren?_x_tr_sl=de&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
I also previously answered a similar question here:
https://***.wefugees.de/813037/stance-chance-despite-having-german-country-family-reunion?show=813054#a813054
Best,
Éanna