I've accidentally created not one, but TWO immortal units:
- a piddly Golden Dragon,
- a Chaos Lord with tens of millions of stats.
I have no idea what exactly happened, but what I think I happened:
- I've beaten the game on Hard as a Druid and continued onto Endless.
- The game started experiencing big stuttering/FPS drops, as is usual for Endless.
- Somewhere along the way, I've bought a Chaos Lord - it spent several turns on the bench, getting XP.
- I've had the offending Golden Dragon since World 2, but I might've put it on the bench, too.
- I've noticed that somewhere along the way, the game started running smoothly again.
- Somewhere around Endless 15 I noticed the Dragon's not dying despite having 455/607 stats.
- Soon after I noticed that Chaos Lord should've taken some damage, but it was on the full HP bar all for several worlds of Endless.
- These two units - and only these two units - remained immortal until Endless 22, at which point I closed the game.
It was all in a single run, and I'm not sure if they will keep being immortal on a save load. I will load the save later today and report it in the comments.