It sounds like the sprocket has come loose on the shaft. It is located by a woodruff key that fits between the shaft and gear. It is held in place by the big slotted screw you see and a star lock washer placed in between the screw head and gear face supposedly keeps the screw from coming loose. Don't try to run the engine at all with the gear out of place or you will do serious damage to the shaft's outer taper and the gear's inner taper.
Has the gear dug into the inner face of the gear case cover?
I doubt that the shaft has moved any. The whole crankshaft would have shifted inside the cases causing the magneto rotor to grind away at the case on the left side of the engine. I suppose that you could look in the magneto housing to see if there are any metal filings all over the place.
The shaft and flywheel half are machined from one piece of metal, so there is no chance of it sliding out of the flywheel unless the crank pin has come loose and the crankshaft is literally coming apart at the seams. Can you share pictures of what you found?