An authentication issue was addressed with improved state management. This issue is fixed in macOS Sonoma 14.6, iOS 17.6 and iPadOS 17.6, iOS 16.7.9 and iPadOS 16.7.9. Photos in the Hidden Photos Album may be viewed without authentication.
https://support.apple.com/en-us/HT214119
https://support.apple.com/en-us/HT214117
https://support.apple.com/en-us/HT214116
http://seclists.org/fulldisclosure/2024/Jul/18