Motorcycle tilts after hazard braking

Hello dear people, the topic was already there two years ago, but maybe someone has a new idea about it. I’m just doing my A-driver license. Had the 5th and 6th driving hours today and had to practice the hazard braking on a Honda CBF 500 with ABS from 50 km/h. Last time everything was no problem. But this time the machine almost overturned 2 times. My driving instructor could not tell me where the problem is and I am therefore unsure. How should I do this in get the grip if I don’t know what I’m doing wrong? Maybe someone here has an idea. To the info: I’m 168 cm tall and weigh 54 kg, get on the ground well with my feet. So that shouldn’t be the problem. But if the machine gets a bit slanted, I can’t hold it anymore. How do I make it that this doesn’t grow into a phobia and I get scared of every braking??? Thank you for helpful answers!