i found here, the default is 10 days:
https://wordpress.stackexchange.com/questions/295152/change-the-default-10-day-expiration-for-the-password-protected-pages-cookie
when you update lay theme, it will be set to 30 minutes.
and you will have a setting for it.
in lay options at the bottom you can set it to at least 1 minute:
Screenshot 2024-10-07 at 12.32.45.png
when trying out this feature, only pages that you login to after you set this setting and updated lay theme; only those will have their password login expire after x minutes.
The others that you logged in before are keeping their old cookie to expire the password login after 10 days.
you can however use a different browser or delete your cookies