Just set the contract length to lets say 20 years.
That will make it way too expensive even for major clubs to pay the fee to buy them out of the contract.
What always helps:
Lower their reputation since most of the big clubs go for reputation when searching for their shortlists.
I always get myself young (35-40 years) nobodies with poor stats, who get a low salary
Then I drop their REP to 100 and set the contract length to 20 years.
This way it never happened again to me that a staff member has been bought out of contract by bigger clubs.