Dear Great Man,
Welcome back to the Wefugees Community and thank you for your question.
A "Duldung" is a "temporary suspension of the deportation" and not a residence permit. Holding a Duldung, people are unfortunately not allowed to leave Germany. In many cases, people receive a Duldung because they can not provide a passport. Without a passport it is very difficult for the authorities to deport people to their country of origin.
I am not aware of cases, in which the immigration offices gave a permition to a Duldung holder to travel to another country in order to apply for a passport. Depending on the individual situation and the actual reasons which prevent the deportation for the time being, you may also be at risk for deportation as soon as you hold a valid travel document.
I will also link our dear @alla_fka here. Maybe she can add some legal details or correct me.
In any case, please don't hesitate to get back to us with any further questions.
All the best,
Meike