I tried GetConsoleMode/SetConsoleMode - these funcions are rather for real console (e.g. in a console application or when a console is created explicitly by means of AllocConsole and so on) than for a PseudoConsole. Anyway, it was worth to try since I didn’t have other ideas.
Eventually I’ve asked another developer for advice since he uses PseudoConsole in his Python code:
https://github.com/veksha/cuda_exterminal/issues/51
From his clarifications, NppExec must support ANSI escape codes to deal with PseudoConsole properly. Which, in its turn, returns us to this:
https://github.com/d0vgan/nppexec/issues/14
The circle closed up :)
So it looks like NppExec requires additional code that will handle the ANSI escape codes.