There is a command to stop sound, but I feel like mojang did not apply this much in the game. When I lit up a nether portal and then break it immediately, I could still hear the sound untill its end. When I kill an enderman, I still hear the sound that he makes since I looked at him. This are just two examples that makes clear mojang did not pay attention at stopping sounds when necessary.
Duplicate of
MC-94956and MC-120226.