A banner’s display time is not the same as the lifetime of its entry in Notification Center. Do not use Windows notifications as a permanent archive.

Three different lifetimes
A banner can disappear while its entry remains in the panel. Separately, a notification can expire or be removed. The underlying email, message, or calendar event has its own lifetime in the source app. A setting that makes banners stay on screen longer does not promise longer history retention.
Why there is no universal retention timer
Microsoft documents app-controlled expiration and a WNS push-notification time-to-live header, X-WNS-TTL. That TTL is measured from receipt by WNS; it prevents late display after expiry. It is not a setting for keeping every notification in your panel for a chosen number of days. Clearing a panel entry also does not by itself prove that the source message was deleted.
Check before clearing
Open the panel with Win+N in Windows 11 or Win+A in Windows 10. Open important alerts in their source apps and save the relevant message, task, or reference there. Avoid clearing the whole list before checking actionable items.
Keep a record you can verify
If you need searchable notification history, test a recorder with the apps you actually use. Check what content it stores, its own retention and deletion controls, and whether it was running when the alert arrived. A recorder is not a guaranteed way to recover previously cleared, unrecorded notifications.