“Sometimes, after resuming from sleep, the laptop doesn't detect its own keyboard. I can assure you, the keyboard was there indeed, and note how the dock is still the default one. This happened to me minutes after setting up the computer for the first time, before I had any chance to install software or change any settings.”
Glad to hear it’s not just me. I think I solved this by re-enabling Bluetooth (2020 MBA). The OP says he hadn’t changed any settings yet though.