Hi, I hope this may be of help but from my experience and knowledge, it should be possible now. It will also depend on your status here in Germany. Someone should correct me if I am wrong but some part of the German law was changed/ updated which now favours foreign students. It states that
Improved possibilities for foreign students in Germany to change their residence status: Foreign students already have the possibility to switch to other types of residence permits even before they complete their studies. For example, rather than continuing their studies, they can begin vocational training and receive a residence permit to attend a vocational training course. The Skilled Immigration Act expands these possibilities to change status: under certain preconditions, and following consideration by the Federal Employment Agency, it is possible to accept a job offer as a qualified professional whilst a person is still studying or receiving vocational training. This entails a switch to a residence permit to work in a qualified occupation. link below
https://***.make-it-in-germany.***/en/visa/skilled-immigration-act/