That's not a 'generic' xfinity issue. If it is related at all it should be fixed by swapping the box. But, it is more likely something in your power or maybe your cable isn't grounded properly at your entrance.
Also, if you have any of Alexa, Google assistant, etc. connected to the TV , they may accidentally be turning it off.