It may have been energized and thrusted forward without actually turning the engine over. It is not uncommon for that to leave the teeth engaged. If you are not in a position to turn the engine over, just leave it. It you think it means there's a problem, that's not necessarily so.
If you engaged the starter for just a bit, but not long enough to start, the starter pinion may stay engaged in the starter ring.
Get the airplane to where you can safely start it. Start the engine and then shut down. The pinion should have retracted. If not, don't run the engine that way.
The Sky-Tec starters do not have this problem of remaining engaged, they always disengage if starting was unsuccessful. This makes hand propping easier .