You can have your residence permit extended for the purpose of school-based vocational training before the expiry of its period of validity if you wish to continue your school-based vocational training in Germany.