Hello @Adi
1) After working for 2 years you are allowed to work in a field that is not connected to the profession that you had your training in. That's what it says in §18a (2) AufenthG. To me that sounds like your residence permit will still be valid (or it will get prolonged) after 2 years.
2) In accordance with § 60a (2) AufenthG you have 6 months to find a new Ausbildung if you quit your first one or if it gets cancelled. Afterwards you will be granted a new Ausbildungsduldung for the duration of your second Ausbildung. Note that you can only switch Ausbildung once.
Best regards,
Thorgen