After embedding a Python script, edits made by right-clicking the script tool and clicking 'Edit' do not persist after closing the ArcGIS session. This means that changes made in this environment are lost when closing the application.
When a script tool is accessed, it creates a temporary Python script file in a Windows Temp directory. Upon closing the application, this directory is cleared. When edits are made to the script, they are applied to the temporary file. These changes are not posted back to the original code. Therefore, any changes that are made to the script are temporary to the session and do not apply to the actual source script from which the temporary file was created. This has been documented as NIM091684.