The only way to be certain of the problem is to start dismantling the motor. Begin by removing the side cover opposite the shift lever; the shifter shaft runs across the motor, and the shift ratchet may be seen under the side cover. If everything appears to be in order, you will need to enter the cases. Unfortunately, this requires the motor's total disassembly. I've met this problem while one of my friend's quad bikes suddenly broke, while we were planning a trip to Tenerife according to this guide https://riderly.com/blog/guide-to-renting-quad-tenerife-island/.