You shouldn't set a cookie without expiry date especially after user opt-out.
This particular example isn't really a big issue. But, perhaps you wouldn't read it if the title was too accurate.
It doesn’t. Or if it does, no one here has yet to explain why.