The secret deactivation code didn't work because there was someone inside the First Demon Army who knew the standard defensive method employed by Khode. Khode installed this deactivation code in every settlement's barrier so that if an uprising occurred, the rebels couldn't utilize the protective barrier.
The existence of this deactivation code was known only to the highest-ranked personnel within the Khode military and governing council. Unfortunately for the Khode Army, such an individual was against them in this war. This individual was Zhong Yuan.
Zhong Yuan informed Amon about the existence of this deactivation code before proceeding to erase the words of power that allowed the code to be activated.
It was due to the knowledge of this code that Amon expected the enemy to throw everything they had when they advanced, instead of sending a vanguard force to test their defense. The full force of Khode Army now bulked over the defensive wall of Surly Gate Town.