This issue was addressed with improved checks. This issue is fixed in iOS 15.7 and iPadOS 15.7, iOS 16, macOS Big Sur 11.7. An app may be able to bypass Privacy preferences.
https://support.apple.com/en-us/HT213486
https://support.apple.com/en-us/HT213443
https://support.apple.com/kb/HT213486
https://support.apple.com/en-us/HT213446
https://support.apple.com/en-us/HT213445
http://seclists.org/fulldisclosure/2022/Oct/49
http://seclists.org/fulldisclosure/2022/Oct/45