CMD doesn't exhibit this problem. Are you going to work around it?TCC is not involved. The API to turn ANSI on & off is SetConsoleMode with the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag. After doing the redirection, Windows is turning off that flag. TCC notices this when it executes the next command, and turns it back on.
You need to contact Microsoft about why they're doing that.
Earlier you said "TCC notices this when it executes the next command, and turns it back on". I don't know how it works but ... can't TCC notice it earlier, say, before issuing the next prompt (without ill effect)?CMD uses different APIs for redirection. I could emulate the CMD behavior, but it would result in losing 99% of the TCC line editing features.