How to prevent a specific set-cookie response header from being removed?

How to prevent a specific set-cookie response header from being removed?

We need to remove set-cookie headers from response to enable caching, but at the same time some set-cookie header is needed to get recently view items on product page.
Do we have any option to keep certain set-cookie header in a way like we can remove it here https://docs.layer0.co/docs/api/core/classes/router_responsewriter.responsewriter.html#removeresponsecookie ?