An access issue was addressed with additional sandbox restrictions on third-party apps. This issue is fixed in macOS Ventura 13. An app may be able to record audio with paired AirPods.
https://github.com/Live-Hack-CVE/CVE-2022-32945
https://support.apple.com/en-us/HT213489