An authentication issue was addressed with improved state management. This issue is fixed in iOS 17.4 and iPadOS 17.4, macOS Sonoma 14.4. Photos in the Hidden Photos Album may be viewed without authentication.
https://support.apple.com/kb/HT214084
https://support.apple.com/kb/HT214081
https://support.apple.com/en-us/HT214084
https://support.apple.com/en-us/HT214081
https://support.apple.com/en-us/120895