If it's only happening when playing games, the phone could be overheating and protecting itself by turning off the hotspot, reducing screen brightness. throttling etc.
Or, If you have something like GameBooster on your phone. Turn that off and see if it helps. It might be disabling the hotspot to improve gaming performance.