Doesn't it ask you if you want to save changes to "Untitled-1" (or whatever #) when you close out? It doesn't care if you exported it as a jpg or printed to pdf, or File/Publish to Pdf, or Save As/pdf.
Also, at any point, while the file is open, Control/S opens the Save Drawing Window if naming for the first time, or merely saves all changes to an existing file.