I don't think we have to discuss what would be the better alternative. People have different preferences and different workflows.Why don't we make a setting for this? Something like "Codepanes can discard edits", and let Nautilus and other
codepanes behave like the Workspace (I remember a time when workspaces asked too before discarding edits)