Do you not see how there is value in having someone who is trained to your specifications? You're still getting labor out of someone but when they move to being a proper dev you don't have to worry about any training issues because you trained them.
I truly doubt you hire developers who are productive from day one, when your mentees will be productive from day one as a real dev AND will probably have less growing pains from having learned bad habits or a different standard at another company.
if you pay them better they won't leave. But you've basically said that even after training they are worth less than someone you hire in at first. This distinction is why people leave. You trained these people in the way you'd like them to work, Tailor-made to your processes but you still say they aren't worth the same as the people you hire-in. No wonder they leave and go some place where they've now been hired in without needing to be trained. If you don't value your own training highly enough to pay these people the market rate, what reason do you expect them to stay and work for you for?