First, turn off the HDMI control on your TV (you didn't mention the brand so figure it out yourself).
Next, open up the software and go to devices tab
Click the troubleshoot option on your soundbar device
Choose "Soundbar responds to some commands either too many times or only occasionally"
Increase the sensitivity to 4 or 5
save and update your remote.
The problem is that the remote is sending out a weak signal and when the TV turns on there is enough interference to block that signal. Increasing the sensitivity will fix it, I've done it many times.