On an IR remote (as your TV uses), there is no real “pairing”. The remote either uses the TV’s codeset and the TV reacts or it doesn’t.
So to “unpair” the TV, you can just use a code that doesn’t work. (Or just don’t press the button.) But I’m not sure exactly what that gets you. Does disabling the power saving mode help?
Does the situation manifest if you turn the TV off and right back on? What make and model of TV is it?
Oh and yes, when selecting a codeset for the TV, sometimes the first one that seems right (makes the music stop) is not the best one for the TV. Do you not have the problem if you use the TV remote to turn off the TV? If the problem goes away if the TV remote is used to power off, then indeed, you might want to lie and tell the Roku the music didn’t stop when It tries that code, so it will try another.