I mean that's easily fixed by just shuffling teachers within commuting range and also only doing the shuffle every 4 years or so for kids to maintain consistency while reaching the stages of development.
Of course there could also be a higher payed tier that can get shuffled further afield for those fresh faced youngin teachers that haven't settled down yet.