In that case, there is nothing to be concerned about.
It jumped out of gear because the detent isn't strong enough to hold the gear in place. If it were strong enough, you probably would complain about how hard you had to push the lever forward to engage the gear, as you have to push it past the detent to engage the gear.
Gearboxes have helical forward gears to make them less noisy. Because they are helical, the force is shared between that used to spin the shaft and to push the shaft against the detent.
If you ever want to ensure it doesn't happen again, keep your hand on the lever and push the lever in the desired direction.
You could fit a stronger spring on the detent, but it would make the car a bugger to drive, as each gear change would need muscles like Popeye.