Hello,
Welcome to our Microsoft Q&A platform!
I could reproduce this issue on my side using that line of code. When I type something and press the enter button, then type something again, the previous text is invisible. The text is there, it is just invisible. I tried other fonts but the behavior only appears when using Segoe MDL2 Assets.
Thank you very much for reporting this issue here. I've reported this to the team via our internal channel. Currently, my suggestion is that please avoid using Segoe MDL2 Assets as the font.
By the way, you could also report this issue in the Feedback Hub. You could find it in the Start Menu.