I haven’t heard of this problem before. I’d guess there is code running that is removing the line breaks. I would first check to see if both \r and \n are being removed or not. Then I’d add a keyDown handler and single step in the debugger through the hundreds of lines of code that run when you hit a key. My guess is that you’ll end up in code you didn’t expect that is removing the whitespace.
I can see '\r' (backslash R) characters there, not '\n' (backslash N).
Should I try to replace '\r' with '\n'? or any other characters?