Creates a cookie copy with a new domain that the cookie is available to.
public function withDomain(?string $domain) : static { $cookie = clone $this; $cookie->domain = $domain; return $cookie; }