If my hypothesis is true, there are two ways they can do it.
First way, the secret way, is to have a inside staff that has access to crucial information about the server and the client's source. And they can easily code a bot. (This actually exists in Conquer Online 2.0)
Second way, you can put a packet "proxy" in place that edits packets as it enters and leaves the client.
If god mode can be done client-sided, which means the client contains the algorithm to decide if an attack is missed or not.
Therefore you can do this,
Code:
Server <==(Packets)==> Proxy <==(Packets)==> Client
What the proxy does is, if the client decided the attack is successful and sends a damage packet to the server, you can edit that packet to becoming a missed packet, then the server acknowledges and you take no damage.
But in order to edit packets, you would need to crack the packet encryption key, which supposedly should change every patch.