If session restoration isn't working for you, please check the following:
System Prefs > General > Close windows when quitting an app is off.
Preferences > General> Startup > Window restoration policy is Use System Window Restoration Setting
Preferences > Advanced > Enable session restoration is on.
You are not using non-native full screen windows. macOS does not support restoring these ☹️
If you've done all this and it still doesn't work, I'll need a debug log that captures info from before restarting and after restarting. Follow these steps:
Turn ON Preferences > Advanced > Append to existing debug log rather than replacing it
Turn ON Preferences > Advanced > Start debug logging automatically when iTerm2 is launched
Prepare your windows to reproduce the issue. It's best if there is only one window to make the debug log easy to analyze.
Wait five seconds. This ensures any recently closed sessions are fully terminated.
Select iTerm2 > Toggle debug logging to start logging.
Type something in the window that you expect to exhibit the bug.
Cmd-tab out of iTerm2 and back. This causes the window state to be saved.
Kill the app. The easiest way to trigger session restoration is to right click the iTerm2 dock icon and choose Force Quit. That's preferred because quitting iTerm2 cleanly will terminate the sessions, and they won't be restored.
Verify the session was not properly restored.
Select iTerm2 > Toggle debug logging to stop logging.