This isn't about adblock. this is cloaking. If someone is employing filters/adblock, their code won't reach the victim. If someone isn't, they can reach out to coinhive directly.
They just need to hide coinhive from the ad platform, which is what they use the random domain for. When the ad platform fetches the ad code from the domain to inspect it, the random domain serves harmless code. When the user fetches the ad code, they get the miner.
The solution is for ad platforms to disallow external resources and custom JavaScript, and for publishers to be held responsible when their sites serve malware (whether directly or because they used an ad platform that sold the space to another ad platform that sold the space to another ad platform that sold the space to a bad guy who was able to serve a custom script because each of the platforms along the chain let everyone include arbitrary scripts).