Could be something as simple as the retention clip on the shiftshaft. The action of the foot on the shifter can cause a slight inward or outward force. Shoving the shifter to the right can cause the shifter claws to foul-up their engagement with the shiftdrum pins. Grab the shifter near the shiftshaft, and push/pull the thing. Shouldn't be more than a millimeter. Any more, then check that clip.
Then there's the neutral detente. Easy to check, see if its spring is bent.
Or, it could be something worse, requiring access to the shifting contrivances behind the clutch.
Search for threads with "starwheel" to see what's involved...