phase anchor etc causing global-level timeflow to become stuck in combat...pretty sure that's a vanilla issue that's exacerbated by mods, and the funny part is that it's a limitation with the game's coding. there's basically nothing in the way of garbage collection for it, and presently no easy way to work around it. havent tested whether a ship's hullmod code still executes once the ship retreats (through any manner) but I'm pretty sure it doesn't; if there is no ship, there is no code on it running.
so it'd require a...higher-'scope'-than-ship plugin or something tracking whether the source of that effect is still there, and the various mods would need to be set up to use such a system. I was thinking about this problem last week and it felt kinda awful to work around.
however, it is 100% possible to address it on a ship that actually died in combat, excluding ones whose hull gets instantly despawned at least. the easy way is to call the timeflow with a unique ID: use something like a static string unique to the hullmod and append ship.getID() with a check for whether it's dead or broken apart, to clear the effect. it also should check for whether the ship is currently the player's ship, though.