They were ejected diplomatically. When I downgraded the relationship to Neutral, that act removes the "open borders"/"right of passage" status. Kavitha's units were ejected outside my borders. The tank ended up in a small cluster of 3 hexes of open territory, not claimed by my cities. The immortals ended up on the coast, in territory not claimed by my cities.I could've sworn that CivBE follows Civ5 in ejecting foreign units from your territory when war has been declared between you and those units' owner.
And yeah, that ridiculously high health is normal for me in the late game. I honestly wonder if it's working as intended, because it's several times more than what one could possibly need even while waging war.
But in one of my early games, I was invaded by Hutama while cooperating. I had the sense that his units in my territory stayed after he declared, but that was almost 4 years ago. I may be misremembering.
I think that the high health must have a multiplicative factor in there somewhere that doesn't scale well.
In addition, I've got the "Joy from Variety" virtue (+1 health for every improved basic resource), +1 health for every city from the Prosperity synergy (with at least 30 cities), and "Public Security" Might virtue for +0.25 health for every military unit (probably 50 of those). Every city has 3 basic health buildings; many also have Gene Gardens, Tidal Turbines, and a few Bionic Labs and Gene Smelters.