As well as the gear teeth, have a good look at the dogs and their opposite numbers on the sides of the gears.
If they are badly worn, the box may jump out of gear.
Here is a knackered 5th gear and its partner . . . . The dogs aren't too bad, but the webs are shot

.
Unfortunately, layshafts are pressed together with a 30-ton press (

), so unless you have one (and a puller to match) a whole new layshaft would be required.
Remember that tall 5th and low 1st gears are available as an option, while you're in there . . . . . . (

).
Bob.