Causes for failure to stay in selected gear
The causes for this are always, always one of the following:
The gear is not fully engaged. This can be due to external linkage, mounts, etc. or internal clearances allowing the shafts to walk fore and aft.
Wear on the mating surfaces of the speed...