I have been experiencing this problem for quite some time. When I try to copy an element from PowerApps formula are and paste it in a Text Editor, the application closes and I can't recover what I have done.
Not all the times that I copy something this happens, but when it happens, it bothers me a lot.