The more I consider this problem the weirder it gets.
Seems there are two conundrums, loose kickstart ratchet nut and a gearbox sprocket running too close to the rear face of the primary chaincase.
The sprocket position is determined by the sleeve gear, its bearing along with the oilseal, retaining circlip, the sprocket itself and centre ring nut. So if these parts are the right ones, assembled correctly, that takes care of that. Always a possibility the sprocket is not made to spec, with too much depth to the rear face into the box. Moving the gearbox sideways or a primary case too close to the gearbox, by whatever means, are other considerations.
Mainshaft sideways location has no effect on this, instead it positions the clutch relative to the rest of the primary drive and chaincase.
The mainshaft bearing in the gearbox inner cover locates on a shoulder, preventing axial movement towards the clutch end, retained the other way by a circlip. Correct assembly should ensure the mainshaft ends up where it should. The sequence moving to the timing side is mainshaft, bearing, pinion sleeve support washer, sleeve and spring, followed by the kickstart pinion, ratchet, tab washer and nut. As noted this nut needs to be fairly tight but the bush can be distorted by overtightening.
Why the shaft continues to turn with box in gear, chain on, rear wheel locked is down to something amiss in the clutch, either poor or maladjusted plates, or clutch adaptor loose on the taper, key sheared? but just grabbing enough to move the primary chain and crank.
As I said, weird!
Swarfy.