That's on GMS1 - if you open a resource in IDE, the IDE memorizes the contents and will overwrite the on-disk version with what it recalled upon saving the project (which happens on run). GMS2 does not share this issue.
So if you must use GMS1, I would suggest to not touch the resources that you are going to edit externally, or subsequently re-open the project in GMS1.
As for losing progress, GMEdit automatically keeps two backups for anything you edit, which you can access via right-click menu on the tab.