Are their Starfleet deserters? Can't you quit whenever you like? Or do you sign up for a set amount of years and are then legally bound to it?
It's not really clear. We know that Spock and McCoy (and Kirk) left Starfleet for periods of time but returned later. Others like B'Elanna Torres quit the Academy but later had charges filed against them because they joined a known terrorist group. If I had to guess, I'd say that it doesn't matter if one quits as long as they go through the proper channels. If one goes AWOL and simply disappears, that's a different story.