If a sound is played then stopped while still playing, the subtitle appears and slowly fades away as if the sound is still audible.
Steps to reproduce:
Enable subtitles in Options -> Music & Sounds -> Show Subtitles: ON
Run command: /playsound minecraft:entity.enderman.scream master @s
While the previous sound is still audible, quickly run: /stopsound @s
Notice the sound cuts off, but the subtitle "Enderman screams" remains.
I think this is an intended behavior.