Launch Music Player of the elementary OS. Click on 'Settings' (gear icon on the top right corner of the Music Player app) and then 'Preferences'. Under the 'Desktop Integration' section, disable 'Continue playback when closed' and you should be done.