Dear @atifraheem48,
Welcome to the Wefugees Community and thank your for reaching out to us.
Yes, with a residence permit according to 25b of the German Residence Act you are allowed to traval to your country of origin. We discussed this topic here as well.
We also talked about how to get the citizenship with this residence permit on this platform before. Please follow this link for more details. However, the German government is currently planning to reform the citizenship law (probably making it possible to go through the naturalization process earlier/reducing the minimum amount of years people need to have stayed in Germany before applying) - so I definitely recommend to stay updated on this!
I hope this helps and please don't hesitate to get back to us with any further questions.
All the best,
Meike