KDE Plasma 6.6 will finally stop the system sleeping when gaming with a controller
(www.gamingonlinux.com)
This varies on the setup. A lot of gaming distributions ship with "gamemode" which among other things, may prevent your system from going into sleep whenever a game is running.
I presume the change in Plasma is so it considers controller input as "user presence" and doesn't go to the screensaver/sleep