Begin by replacing the seat and socket.
I sell a heavy duty replacement that is much better than stock.
If it still pops out of gear, I would supect a worn mainshaft bearing retainer.
As a result, the mainshaft is moving, and walking the shift collar out of contact with the 3rd gear.
I sell a heavy duty plate to fit that also. It is on my trans page.
Check for supended aluminun in the oil, it could be a worn fork. However, this is not a common failure.
Of course, I would advise a rebuilt trans, but as long as you do not have worn out bearings, the trans could be "patched up".