Hi there dfb-mbp,
Thanks for stopping by the Apple Support Communities.
Based on the error you're describing, we would recommend first seeing if you can replicate it in safe mode. This will help us isolate potential conflicting software, and possibly repair issues found on your startup disk. To learn more about why safe mode can be helpful, how to boot to it, and what to do with your findings, please review How to use safe mode on your Mac - Apple Support. Booting to safe mode on its own may even resolve the issue.
If the issue continues after that, see if it also continues in a new user. A new user account will help us determine if the issue might be stemming from something specific to your user account, such as particular software that is running or other data you have: Add a user or group on Mac - Apple Support
Should you still need some help after that, we recommend getting in touch with Apple Support directly. They will have access to the tools and resources necessary to investigate what is occurring with XProtect. You can get in touch with them here: Get Support.
Have a wonderful day!