I mean, this is really very simple. Everybody knows how to stop this.
Employment contracts and collective bargaining.
Do that, and players will stay at the schools they originally commit to. If you're not willing to support that, then you can't really complain when they don't.