The source code changes made to an instance icon are always permanent. Just edit the icon's source code again and you'll see your changes.
The changes you apply directly to a process interface (by clicking the Edit Instance Source Code tool button (empty square)) are permanent as long as you don't reset the tool, or load a new instance (e.g. from a process icon), which replaces the previous one.
Dynamic tools such as DBE are slightly different because if you launch it from Process Explorer, the tool will load a default set of parameter values. This is by design. However, you can modify an existing process icon and then launch the process from it. This will load all parameter values from the icon's instance.