You should check to see that the flywheel is properly indexed. There is a mark on the flywheel for TDC. The mark on a BMW is usually OT. Take the spark plugs out. Leave the ignition off for this. Stick a wooden dowel into the plug hole and follow the progress of the piston by feeling the dowel rise as the piston rises. Be careful not to break the wooden stick off in the cylinder or other wise cause any damage. But the piston should be at the top of it's travel anytime the OT mark appears in the timing window.
Do not drive this bike any more until you figure out why this strange behavior. I think the engine ignition may be way off and this could be because the flywheel is not properly indexed.
If the OT mark on the flywheel corresponds to the piston reaching the top of it's travel then you can recheck the advance and idle timing.
The symptom you report of the engine not shutting off sounds like the ignition is Way off. This must be solved before it blows up. Do not run the bike if the exhaust pipes are getting Red Hot.