Hi @helios
According to the 3+2 rule, it is mandatory to have a job in the Ausbildung profession in order to benefit from the 2 years of residency after completing the Ausbildung.
If you wish to study after completing the Ausbildung, then you can apply for a residence permit for the purposes of studying. For this, however, you will have to filfil other requirements and will likely first have to leave Germany, obtain a study visa and then return.
Best,
Éanna