When you hit the Esc key it should ask you if you want to dock at....or end patrol or save and exit.
Initially select dock at....and the game will create an end of patrol data save.
After that you can come out of game or upgrade your boat or start another patrol etc.
On my installation I have to double click to confirm my action/intent, the first click only highlights the option.
Could this be what your doing wrong perhaps?