I have a ROKU soundbar connected to an RCA 4K TV. During set up everything worked fine then I tried to turn the TV off and it would not power off, either from the remote or the ROKU home screen. I reset the remote and noticed the TV brand was MTS not RCA. I changed the brand to RCA and continued the setup. The TV turned off and on during setup but stopped immediately after . I then went back to setup and the brand was MTS again. I left it alone and went forward with the setup, The TV again turned off and on during setup but only then. I even tried resetting the entire soundbar, same result
Being able to chose a tv brand for the soundbar remote to control is new, previously you couldn't chose and didn't have to, reason is the soundbar remote would control any brand of tv without programming because the tv controls on the soundbar remote controlled the roku soundbar or any roku, it was the soundbar that sent hdmi-cec pulse over the hdmi cable and it controlled the tv. As long as your tv had hdmi-cec feature and it was turned on. Older tv were out of luck, but now they are not with you able to set the tv brand and control by IR, of course this only with roku wifi remote, not IR only remote.
So in your case, first what model of roku soundbar do you have, Roku or Walmart Onn? The Roku brand sound bar comes with wifi voice remote, where the Onn Roku soundbar's remote is IR and not programmable at all. I would reset the soundbar, do not program the remote for the tv at all, just set up the soundbar and see if it just controls your tv.
Edmund Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution." If you appreciate my answer, maybe give me a Kudo.