Just to make this 100% clear, you need to right-click on the Joplin icon in the system tray and close it there.