It is not possible for Supercell to detect XMOD users. When a user is in between the game, their activities cannot be detected by supercell. It is not easy for the Supercell to know whether the user is good.
The supercell uses the sneaky process to find the XMOD. COC (Clash of Clans) is used by supercell to check the notification of the XMOD. The message will appears on the top of the screen when the user plays the game. You should avoid or ban such notifications simply by turning off the notification.
Can Supercell Detect XMOD?
No, Supercell is not able to detect XMOD.
However, Clash of Clans (COC) helps supercell to find the XMOD by notification that users receive on the top while playing games. In order to avoid this, you can turn off the notification.