While typing up a plausible explanation for this behavior, I believe I have an answer as to why he's doing this.
At the beginning of any Ultima Weapon battle his HP are set to whatever the appropriate Global Variables are (the battle AI refers to them as GlobalVars:005B, GlobalVars:005C, and GlobalVars:005D. Those are byte values and his HP is a three-byte value). When you start the first battle, he runs away immediately. This is because he has 0 HP. Only the Ultima Weapon above Cosmo Canyon can be "killed". When you start that battle, he starts out with 0 HP. Therefore, he is unkillable.
"Death" is a rather flaky thing in this game. A battle ends when all targets on either the allies' side or the enemies' side are flagged as dead. Targets only get flagged as dead when their HP change from non-zero to 0. Since his HP are already 0 then he never changed so he's never flagged as dead and the battle continues.
Two questions now appear:
1. But he's supposed to start out with at least 20000 HP. Why doesn't he have that?
Here's my theory (someone feel free to back me up on this). Initiating a battle with Ultima Weapon(s) runs a specific field script that looks at GlobalVar:007B. If that value ANDed with 4 is 4 then the GlobalVars listed above are set appropriately to give him 20000 HP. However, when run from the Debug room, this script isn't active. Therefore, it doesn't reset his HP from 0 and the battle will load his initial HP to 0 and continue ad infinitum.
2. Why is he (trying to) using Ultima Beam every round? He's only supposed to use that once every five rounds.
This....I can't answer.
SUGGESTION:
Try healing him first. THEN striking him. I'm willing to bet that that will kill him.