The published version of your project becomes different from the version displayed in the editor as soon as you add a new widget.
If you made unwanted changes and need to revert the updates in the Editor mode, open your Project settings (M) and click 'Restore to last published'. As a result, the published version of your project will be recreated in the Editor mode.
It is not possible to revert to the previous version of your project as soon as the Restore to last published button is clicked.