The 1999 Subaru Forester GT I’ve owned for 24 years won't stay in fifth gear. It jumps out of gear on slight over-run or even if held in place. There are no gearbox noises and all the other gears are normal. Yes, the car has done 470,000km of careful and sensible driving. Is a gearbox overhaul an option?
Before you commit to any costly course of action, go back to basics. A car that jumps out of gear might have a poorly adjusted shifter or linkage mechanism rather than something internal to the gearbox. Even a worn engine or transmission mount can allow enough movement for the car to jump out of gear. So check that stuff first.
In terms of rebuilding a gearbox like this one, you may find the cost is greater than the retained value of the vehicle. Not to mention, with that sort of mileage, that you’ll lie awake at night wondering what’s going to break next. At that point, you have to make a call. But don’t forget, you might be able to find a second-hand gearbox in good condition at a parts recycler, and have that fitted for a fraction of the cost of an overhaul. And then you’re on your way to your second half-million kilometres.