Likely a shift mechanism problem. they should not jump out of gear. The external mechanism - selector drum head and the shifter levers - is accessible under the side cover. The drum detent should be very secure, its spring can get weak and allow it to turn under force from the internal parts.
Rather more likely is damage/wear on the shift drum and/or shifter forks. This is all inside the main case and the bottom has to be removed to get at it. Complete transmissions show up on ebay fairly often, not too much $$$, just a gamble "is this better than what I have". NOS parts are not common and are expensive. All the transmission parts are NLA from Honda except some of the bearings.