It is not like they are being kidnapped/brainwashed to work there aka Soviet Union style, or their genocidal war crimes are ignored like the US did with Nazi scientists.
Chinese companies are simply offering a good financial package to these people with valuable skill sets. TSMC can pay it's employees to retain they can certainly afford to.
Taiwan is not officially exporting talent to China.
No country wants their best people to leave, US and countries have used their wealth to attract the best from developing countries and benefited immensely, china is also using a similar strategy