did you bench bleed the master cylinder, and bleed the rest of the brakes including the abs(to bleed abs you need to acitvate the system with a scan tool).
If you found my answer helpful, please don't forget to Accept. I can continue to provide assistance even after you have Accepted. Your positive feedback is greatly appreciated!
Technician
BMW Master Certifed level 1 Technican