The best thing for u to do is to wait till she delivers the baby
After then u make DNA test, when u have the prove that the baby is yours then the authority can never say they won't allow u to make the father declaration and the Sorgerecht is very important but u need a Lawyer to help with this.since your baby is a German you have the right to get your residence. But your process will be quiet long and difficult but u will get your residence