M1 Mac Mini won't respond to keyboard presses or mouse clicks
Within the past week, my M1 Mac Mini (8/8/16GB/1TB, macOS 11.4 and 11.5) will stop responding to mouse clicks and keyboard presses. The mouse cursor remains movable but the computer will not respond to input. Pressing the power button will bring up the menu to restart etc., but no options can be selected. Only a power down will fix the issue, often resulting in a loss of work.
This is happening once or twice a day.
How can I prevent this?
Mac mini, macOS 11.5