Using listener with tokens is not supported in browsers
The browser implementation of EventSource does not allow for sending custom headers. Therefore, authenticating a listener request using a token will not work in browsers.
Configuring the sanity client using a token in the browser has security implications, and should only be done after a careful consideration.
Instead consider setting the visibility of your dataset to public or make sure users are logged in using cookies when accessing your frontend.