After conducting a battle and not defeating the monsters (they fled, died to the hero), information about the casualties should be written back to the map's data, but you can only record 1 type of monster – namely, non-upgraded ones. And the game "loses" or doesn't record the upgraded ones because they have a different type.
Hence, we have this trick: attack, then flee. The total quantity will decrease by the number of upgraded units that were present during the attack. Analogy: attack, kill all the non-upgraded units, flee, and voila – there are no monsters left at all.
And if we know that we cannot defeat some guard force with our entire army, we can buy 5-6 suicide heroes, attack several times, and the number of troops in that guard force will significantly decrease, and then we can finish them off with a regular army.
This is only relevant for monsters on the map; it does not apply to banks or Pandor/events.
And I warn you that using this is illegal in most cases in tournaments and even ordinary games on most Heroes resources.