Linux systems are designed to auto suspend USB devices.
The idea of automatically suspending devices seems like a sane idea for laptops when conserving battery output is a concern.
The idea makes little sense on any system using normal AC power.
There are many online complaints about this behavior. Sometimes users experience desktop “freezing” when this happens because the USB mouse and keyboard are not restored correctly. Sometimes the desktop does actually freeze, but often this is an illusion because there are no input devices to access the desktop.
Oddly, in these many complaints users will note that Windows does not have this problem.
All desktop environments should provide a simple GUI method to disable this behavior. Perhaps in the power manager tools.
The auto suspend algorithm should detect the source of power and adjust auto suspend accordingly.