Hey Fabian, you may be interested in a new command available in the latest WASM client: terminateDuckDB() (docs). This lets you terminate the DuckDB instance in the browser so you can swap tokens or reconnect without having to refresh.
Thanks for raising this! This appears to be a known issue and I've raised your use-case internally. We might have a workaround coming soon -- I will keep you posted.
Today, the only workaround is to reload the webpage. Does this unblock you for now?