You will definitely need ISTA diagnostics...
- Were there any previous disturbing strange behavior of the gearbox like jerks?
- Has there been any modification to the gearbox software or the engine power software?
- Are you the first owner of the car from new?
- How he got home?
Possible solutions;
- Basic gearbox service, filters and transmission oil, will take care of the matter
- The gear selector will have to be replaced
- Mechatronics is damaged - (the cost is terrible)
Without a proper diagnosis it is a "fantasy of tea leaves"
BMW has a procedure to replace parts in the style of, - not this one, then the next one, and if not the next one, then another one.- You pay for it, because the part installed is non-returnable and the queue for a specific part that is actually damaged in the case of a gearbox is quite long. If you have a trusted mechanic, I would strongly recommend you to contact him and it would be best if it was a place where they
only repair gearboxes and clutches