Sorry to hear about your issue, but glad it turned out okay.
A summary of some other C 400 engine problem reports:
-----------------------
In 2023, my '22 C 400 GT, with about 5,600 miles, had an engine problem. I heard second- or third-hand that a valve-keeper spring failed, or got dislodged, or something, leading to a bigger problem (although I didn't experience any tailpipe smoke, to my knowledge).
(By second- or third-hand, I mean that my buddy, who went to the dealership with me, was told something like that by one of the techs there. But note that the local place didn't actually repair or replace the engine, so I don't consider that report definitive.)
After five months or so, my '22 was replaced by a brand new '23; see
https://www.bmw-scooters.com/threads/c400x-engine-failure.3832/
-----------------------
In 2025, the '24 C 400 GT owned by
@missphy6 had an engine oil leak that couldn't be fixed. Unlike in my case, the engine was replaced, rather than the entire bike; see
https://www.bmw-scooters.com/threads/new-2024-c400gt-needs-engine.3627/
-----------------------
Good thing you had the extended warranty. My '22 was under the regular warranty, but I had already purchased an extended warranty for it, too (way early, as I had some spare change). Regarding my '23, just a few weeks ago I purchased an extended warranty for it, as its three-year factory warranty is about to expire.