When my friends and I wrote some cheats in the past we used to hook VAC so that when it wanted to run we'd unload our hooks/cheats and let it complete scanning as normal, then once VAC was completed we'd re-hook and re-load our library/hooks.
This also allowed us to iterate on development by having live-reload of the .dll on disk by unhooking, reloading dll, and rehooking.
This was back in the days of Counter Strike: Source, when it first came out.
The day it was first released on macOS was fun too... Valve forgot to strip debug symbols on their macOS, so we were able to dump all of the debug symbols and get a much better idea on what to hook/look for and what the various structures were used for!
At least in the past, admins on servers had the option to intervene and ban people (although they could be bypassed as well). Nowadays games opt for having entirely managing servers, sadly.
Usually when someone accuses another player of cheating they are just tilted and reacting to getting out aimed or seeing something suspicious due to how netcode handles lag/ping differential with interpolation, which is adjustable.
The solution to cheating problems isn't necessarily technical, it's also social, and I think it reflects a bigger issue in our society, also present on social platforms. When anyone can interact with strangers and behave however they want, there's going to be trolls and others, motivated by the feeling that they can't be held accountable for ruining someone else's fun (or, just not realizing they are not having healthy interactions).
Lots of online platforms have developed lots of ways to cope with this, from karma systems to moderators, to social credits, to ID verification. Couldn't games take a page from that book?
Rockstar only cared about cheating in GTA5 because people were duplicating in game money that Rockstar was trying to sell you for real money. They didn't care about cheating in GTA4 because it didn't affect any potential revenue since it only affected people who had already bought the game.
Not the same level of frustration as a permaban. But I was pretty annoyed that I had to jump through hoops on a brand-new system. Really weird.
The most damning thing for me wasn't just the subreddits dedicated to just indexing valve's lack of attention, or the way they appear to genuinely make money off of the cheating ecosystem.
The worst was when I learned that VAC (their anti-cheating platform, IIRC) was so bad (at the time) that it appeared to only ban exact binary matches for detected cheats.
So if you wrote a cheat, that eventually, ages later did end up getting banned by VAC, all you would have to do would be to go back to your source, rename a few functions and files, recompile to a new binary, and you'd be good to go again.
As a sidenote, I just attempted to find the article that documented what I said above, and I found github repositories like this instead: https://github.com/danielkrupinski/VAC-Bypass The fact that things like this are front page google responses to phrases like "VAC Ban" (what I typed in google), really demonstrates just how abysmal Valve's performance is here.