I experienced the restore windows bug for several times when I try to open the Open Office or LibreOffice. Usually, my workaround is to remove the existing application and install the new one. I guess the root cause of the problem is I didn’t close each application separately before shutting down my laptop and causing this bug keeps occurring in my application.
When I try to open the application, this window will prompt out:

Neither “Don’t Restore Windows” button nor “Restore Windows” button is working. I cannot use the application to create new documents or view any documents properly. I tried to kill the process via Activity Monitor and it won’t solve the problem as it reappears again when I open the application next time.
Recently, I found the workaround to fix the problem. In Mac, search for the Terminal application and run this command to remove the savedState file:
rm -fr ~/Library/Saved\ Application\ State/org.libreoffice.script.savedState/
Bug reference:
Bug 39007 – Persistent “Restore Windows” dialog won’t disappear, disables key functionality