Polk Commandbar Switching from laptop back to TV

Hi everyone, hopefully someone can help me out. I have set up my soundbar however when I have connected my laptop to it to play its sound it will play for a while, usually a few minutes, but then the soundbar will disconnect and play the tv sound again without my consent. Any help to resolve this would be appreciated.