Lots of organisations seem to think that if they have to train an employee, then there should be some kind of discount on the salary for that employee. This is totally the wrong way of looking at it.
Training your staff in what you need them to know means that they have a consistent view of the subject, practices, etc. No more "but that's how I've been doing it for 2 years in the last place" or "I taught myself and discovered this way of doing it and I think it's cool". A junior employee who was trained in the exact tech stack you're using is more valuable than a mid (or even senior) who has random experience.
Not to mention, if your employees trust that you'll train them in what they need to know, they're massively less likely to pick technologies based on resume need. And massively more likely to stay with you.
But, really, if company wants to retain people after training, maybe make it worth it to the people to stay.