Currently in my Angular 7 project, I have integrated the Monaco editor for coding purposes. One issue I am facing is that when I make a change to the code and then press ctrl+z to undo it, the previous code is successfully restored. However, if I change the coding language and then try to undo a recent change by pressing ctrl+z, the previous code does not get restored. This means that after changing the coding language, the ability to restore the previous code using ctrl+z is lost.
I would appreciate any help or suggestions to resolve this issue. Thank you.