Hopefully the gears can be exchanged without removing the cilinders, head and timingchain......
In my copy of the Suzuki GSF400 Bandit Service Manual,
on page 3-3, there is a listing of all the components that can be removed while the engine is still in place (i.e. still installed in the bike's frame). You won't find the transmission's gears anywhere on that list so you must continue onward to the next page of the Service Manual.
After the listing of easily removed items (page 3-3) the Service Manual begins describing the process of removing the engine from the frame and then it goes step-by-step through the actual disassembly of the engine.
The Service Manual's description of engine disassembly continues in this logical, step-by-step manner, beginning on page 3-4 and continuing until the engine has been completely disassembled on page 3-20. If you look through these pages you'll see that the gearbox components are the very last items that are accessible during the disassembly process.
So it appears to me that you will have to perform a complete engine removal and disassembly in order to gain access the gearbox components.
But, as I said before, the necessity of completely disassembling the engine to reach the gearbox components will afford you an opportunity to address any other maintenance issues the bike might have like worn piston rings or worn valve guides or a cam chain that doesn't pass the length measurement test or worn cam chain tensioning guides, etc.