Xbox keeps turning off by itself while Playing MCC

Has anybody having problems when your in the middle of the match your Xbox keeps turning off by itself and freezing it seems like whenever I play MCC it’s keeps doing that shutting off on me