Under what conditions?
Any time I've had a bike do that, it was when the engine was running and you were stopped, trying to get from 1st to neutral. Like at a red light.
And it usually was when the clutch was mis-adjusted and not fully disengaging when you pulled in the lever. Kept a bit of load on the clutch and made it a bear to get to neutral while at a stop. If you slipped it into neutral while still rolling, it'd be OK. So, a bit of clutch cable tweaking and the problem would go away.
Good luck with it.
Kirk