Only anecdotal, but I personally know of one case in China where the bulk of a doctorate was done by a student's friend. Can't speak to how widespread this is, but the problem is real.
Having taught at several institutes in the Anglosphere, a disproportionate amount of cheating I've witnessed has come from those who speak English as a second language. Difficulties with English and the need to 'save face' probably push otherwise honest students into doing this. Which also says something about admission tests. It's something of an open secret that administrators turn a blind eye to suspicious admission results, as enrolment and tuition money are a strong incentive.
It's not an easy problem to solve, but I suspect proper admission filtering would eliminate the bulk of cheating, and the remainder could probably be dealt with by empowering professors.
If the professors or TAs are paying attention, they already know who the cheats are. It's not hard to spot when weak students suddenly start acing tests and mastering skills they didn't understand the week prior. There needs to be more leeway, institutional support, and incentives for academics to challenge suspicious students, e.g. via oral examinations.
Trying to solve this using software is just an attempt to avoid tackling the real problems.