My brother recently bought used BMW and he's facing the same issue.
I was interested in getting used BMW from another dealer after my brother got his.
I asked the dealer if I can check the car at BMW with him before I make a decision.
We met at the BMW service center and the customer service agent showed me the record from their system by scanning the key.
The chassis number from the car to their system matched.
Record was clean.
My brother went along with me and he asked them to check his car record too and from their system we found out that his mileage was tempered so badly.
He's trying to settle with the dealer but if it doesn't turn out well as what we have requested, we will bring to the tribunal court too.
Hope things turn out well for you.