If it jumps out of 3rd,you can increase the dog engagement.
Loosen the mainshaft nut at the kickstart ratchet.Select 3rd gear.See how far you can push the mainshaft in,before it bottoms on the 3rd gear drive dogs.

You can fit a shim,slightly less than that,between the timing-side mainshaft bearing and the gear on the mainshaft.This works,if there is still some clearance left (not bottomed out hard).

After that,you need to shim the crankshaft sprocket an equal amount,to keep primary chain alignment.Check the chain alignment.