Have you granted permissions to KM in MacOS System Preferences Security & Privacy > Screen Recording?
Security & Privacy > Screen Recording?
Try if this helps
For more information, see the wiki Searching the Forum for Answers section.