Hi toughtfulinsights,
Thank you for using the Apple Support Communities! I understand you are running into an issue with your external keyboard no longer working after your MacBook wakes from sleep. I'd like to help.
It's good to know you can get your keyboard working again after a restart. I would like to have you reset the SMC next, as this can help resolve issues related to sleep/wake cycles and keyboard issues: How to reset the System Management Controller (SMC) on your Mac - Apple Support.
Do you leave any programs running when you close the lid on your MacBook to place it into sleep? If so, try closing out of all running programs and test for the issue again. Do you have any additional peripherals connected to your MacBook? If so, try disconnecting them and test your keyboard again.
If the same behavior continues, let's have you boot up into safe mode. It’s a way to start up your Mac so it performs certain checks, repairs, emptying of system cache, and prevents some software from automatically loading: Use safe mode to isolate issues with your Mac - Apple Support. Once in safe mode, try placing your MacBook into sleep and then test your keyboard when you wake your Mac. Note the results, then restart your Mac and log in as normal. Sometimes safe mode can resolve some issues, so be sure to test once more for the same issue once you boot back into normal mode.
Keep me posted on the results.
Thank you for your time.