This happens in almost any school.
There are some people who are only in it to get their black belt, and then they think that that's as far as they want to go. They might want to pursue something else, or perhaps they don't want to pay tuition anymore. Maybe you can "save" a small number of these folks, but it's pretty hard to change their minds. After all, they are the ones who are going to make the ultimate decision, as to whether or not they want to continue training.
There are some people who want to "take a break" after they make shodan. This is a dangerous thing, indeed, since the odds of them coming back from "that break" aren't in your favor.
The important thing is to somehow keep them training, so they can enjoy the more advanced training, and see the benefits of continuing.
This is why I tend to think of contracts as a good thing, since they're essentially obliged to continue making payments, and that, in and of itself, can be enough of a motivation for them to continue training, so that they can get their money's worth. Once they take on the more advanced training, it's entirely possible that they can motivate themselves to stay in the program.
In the end, though, many of your newly minted black belts are going to quit soon after attaining shodan. One of my old teachers once told me, that out of fifty people who begin the program, only one of them is going to make it to shodan. Out of the people who make it to shodan, only about one in ten are going to make it to nidan.
How do you solve this problem? You can't. Running a school is like constantly having to refill a leaky bucket. While you can slow the water flow (plugging some of the leaks / retaining your students better), you'll never stop the flow of water, and sooner or later, your bucket will run dry (your school will be empty) unless you continually refill the bucket.
Even you won't be able to refill that bucket anymore, no matter how dedicated you are, since you're not going to live forever.
On the bright side, every time you refill that dojo with a new infusion of white belts, someone amongst that crop is going to step it up, and that's where you can get more black belts in the long run.