Let me check again. I haven't figured out the issue with Sir yet. I specifically created a "special" version for my test with 10,000 Phoenixes and portals. I take the Phoenixes, attack Sir Grim. Before I can defeat him, I manage to eliminate the Goblins and Orcs. I win. I check the troops – everything is in place. So far, no clues, unfortunately.
I should note that restoring the troops to their original numbers in this case was not due to a script error, but simply a feature of the Phoenixes' "Resurrection" ability;
for testing, it would have been better to use Archangels or Titans...