The obvious solution to this would be to charge them for the apprenticeship, financing it yourself with a loan from master to apprentice (which then immediately goes back to the master as "tuition"). If they are immediately poached at a high salary, they'll have to pay back the loan.
The traditional solution, enslavement, has a bad reputation today.
The traditional solution, enslavement, has a bad reputation today.