Occurs when exiting play mode, before the Editor is in edit mode.
In this condition, EditorApplication.isPlaying is true and EditorApplication.isPlayingOrWillChangePlaymode is false.
For new code, use OnExitingPlayModeAttribute instead to avoid unnecessary event subscription handling. For more information, refer to Code reload and the code lifecycle in the manual.