A streaming session is created for the duration of the token. When the token is refreshed, you need to share the new token with the streaming session. This can be achieved using the /streamingws/authorize endpoint, by providing the contextId of the session.
More Resources
GitHub - TypeScript sample for streaming with token refresh
GitHub - Python sample for streaming with token refresh