Hello and welcome back to Wefugees,
I agree with Islito. In principle, it is possible to recognise paternity even with a toleration (Duldung). However, authorities vary in their strictness - especially if one parent only has a Duldung/no residence permit. In some cases, the competent authorities (youth welfare office/Jugendeamt or registry office/Standesamt) check whether the paternity acknowledgement is serious and is not a so-called fictitious paternity (e.g. to secure residence). The immigration authorities may also be involved in this process. The new federal government even wants to introduce a new law, which in turn states that the foreigners authority should always be involved if there is a discrepancy between the parents involved with regard to their residence. However, this proposal has not yet been adopted or implemented.
I hope that this information will help you and we are keeping our fingers crossed that the paternity acknowledgement will go smoothly for you.
Best regards,
Meike