Dear @Dr.aka,
Welcome back to the Wefugees Community and thank you for your question about the recently introduced residence permit for vocational training (according to §16g of the German Residence Act).
Handbook Germany just published information on this type of residence permit in various languages which give a good overview.
They state:
You can obtain a residence permit for vocational training if you have been in Germany:
- or are an asylum seeker, and your asylum application was rejected during your vocational training,
And also:
Please follow the above posted link for more details.
This residence permit also allows you to travel abroad - of yourse you need to comply with the visa regulations of the respective country (in your case Iran).
I hope this helps and all the best,
Meike