Manual closing of the hatch in case of electric drive failure
Remove the trim and use a hex key (arrow in the picture) use the car tool kit to set the sunroof to the required position.

To fix the problem, contact a BMW service station.
The original version is on the portal BMWMan.ru
