AntiCheat in general is in a laughable state, it is very easy to write something that still works. Once you have access to ram on that level it’s game over as the guest has no indication that you do.
You also don’t need to alter it… ie, ESP, just read out the entity information, nothing is changed and as such nothing to detect.
Also if you did alter things, memory scans are expensive, and in a real time FPS game, could cause so much lag the game would be unplayable (ie: The new Assassins Creed game). The scans have to be rare, and targeted.
You could also patch the scanner…
Edit: You could even trap the reads to the altered pages of memory and reverse the change before returning control to the guest.
I once many years ago reverse engineered a very popular game engine’s net code so that I could inspect player actions on the server for my own anti-cheat implementation. While I did this for good (detect teleporters, speed hacks, etc), if the knowledge was out there it would be usable for another completely undetectable ESP hack that could be done by just sniffing network traffic on your lan from another PC.
While this sounds complex and like nobody else would do this… my foot in the door for this technique came from someone else that published the decryption algo for the protocol, specifically so that others could write cheats to use it.