This issue was addressed with improved access restrictions. This issue is fixed in visionOS 2.4, macOS Ventura 13.7.5, tvOS 18.4, iOS 18.4 and iPadOS 18.4, macOS Sequoia 15.4, macOS Sonoma 14.7.5. A malicious app may be able to dismiss the system notification on the Lock Screen that a recording was started.
https://support.apple.com/en-us/122378
https://support.apple.com/en-us/122377
https://support.apple.com/en-us/122375
https://support.apple.com/en-us/122374