Barring a more full disclosure of when is running on this computer via the usage of Etrecheck application and posting the report
when this issue in occurring
Open the Activity Monitor application
Make sure to use View >> View All Processes
What process or processes are using the Most CPU and Memory.
When I examined the " WindowsManager" process
In the below, I see various open files directly tied to WindowsManager process
The Last entry is of interest.
It seems related to Allow which could be related to Allowing a Process or possible Allowing a Third Party Device access to say a Microphone ?
/System/Library/CoreServices/WindowManager.app/Contents/MacOS/WindowManager
/Library/Preferences/Logging/.plist-cache.XaUpS1n5
/usr/share/icu/icudt74l.dat
/System/Library/Frameworks/Foundation.framework/Versions/C/Resources/FoundationErrors.loctable
/System/Library/CoreServices/WindowManager.app/Contents/Resources/InfoPlist.loctable
/System/Library/CoreServices/SystemVersion.bundle/English.lproj/SystemVersion.strings
/System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/SystemAppearance.car
/System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/Aqua.car
/System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/FauxVibrantLight.car
/System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/VibrantLight.car
/System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat
/System/Library/Caches/com.apple.IntlDataCache.le.kbdx
/System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/InfoPlist.loctable
/private/var/db/analyticsd/events.allowlist