The process would be just like driving a (pre steering column lock) car with the clutch system out. Start in first accelerate to 10mph. push out of gear, shut off engine until rpms reach 0. Shift into second, restart engine, accelerate to 30mph. push out of gear, shut off engine until rpms reach 0, shift into third, restart engine, etc.
I did this with a 76 Datsun B210 to avoid a ruinous tow bill. If you do this in a modern car, the possibility of the steering wheel locking during the shut off makes this a dangerous practice.
Back to the bike, shifting gears during a coasting in neutral step, rather than shifting under power, would avoid catastrophe. -Edward