Dear @Dev,
Welcome back to the Wefugees Community and thanks for reaching out to us again.
However, I would highly recommend you to get individual support and counselling either by a lawyer or at an experienced counselling office, as I already mentioned in your earlier opened thread.
Your situation seems to be indeed quite complicated and we are not able to give detailed advice on this public plattform - especially without knowing your case and circumstances in detail.
On the one hand, providing the passport (clearing the identity) is often mandatory for obtaining (keeping) certain types of residence permits (or the so-called "Ausbildungsduldung"). On the other hand, people without a residence permit are at risk to get deported as soon as the immigration office (Ausländerbehörde) has the passport. People affected can find themselves in kind of a dilemma.
I am sorry that we can not help you much here, but please let us know if you need support in finding organisations which offer counselling services.
All the best,
Meike