New node-red docker install: "Invalid access token for websocket"

I’ve just installed node-red v3.0.2 in a docker container, for use with my HA 2022.11 Core instance (also running in a docker container. I followed the instructions from here:

Eveything seemed to go OK, but when I got to the last stage (opening the events:state node and trying to list the HA entities) node-red crashed with the error “invalid access token for websocket”

I had generated a long-life access token in HA, and supplied this to the node-red server details.

Any idea how I can diagnose this?

Edit: I’ve just re-done the process and the node-red server crashes as soon as I deploy the HA server in the node-red UI

sudo docker run -it -p 1880:1880 -v nodered:/data --name nodered nodered/node-red
7 Dec 18:28:26 - [info] 

Welcome to Node-RED
===================

7 Dec 18:28:26 - [info] Node-RED version: v3.0.2
7 Dec 18:28:26 - [info] Node.js  version: v16.16.0
7 Dec 18:28:26 - [info] Linux 5.4.0-131-generic x64 LE
7 Dec 18:28:28 - [info] Loading palette nodes
7 Dec 18:28:31 - [info] Settings file  : /data/settings.js
7 Dec 18:28:31 - [info] Context store  : 'default' [module=memory]
7 Dec 18:28:31 - [info] User directory : /data
7 Dec 18:28:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
7 Dec 18:28:31 - [info] Flows file     : /data/flows.json
7 Dec 18:28:31 - [info] Server now running at http://127.0.0.1:1880/
7 Dec 18:28:31 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

7 Dec 18:28:31 - [info] Starting flows
7 Dec 18:28:31 - [info] Started flows
7 Dec 18:28:31 - [info] [server:Home Assistant] Connecting to https://192.168.1.36:8123
7 Dec 18:28:31 - [red] Uncaught Exception:
7 Dec 18:28:31 - [error] Error: Invalid access token for websocket
    at /data/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:112:29
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Websocket.connect (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:

The latest release, v0.47.1, will allow you to enter a correct access token.

Thanks for that. Sorry to ask a dumb question, but how can I clear my existing nodered installation (or config) so that I can load the new version of the websocket? I’ve tried removing the docker container and re-installing it with a different local path mapping, but it seems to have retained my HA settings and continues to fail with the “invalid token” error when I try to load it
EDIT: I’ve also tried removing the docker nodered image using the docker rmi option but the HA websocket config still seems to be persisting. I can’t see anything in my HA config folders to remove either.
???

OK so I finally managed to work around the websocket config issue by installing a new node-red container with a different container name. This time I was able to add the HA server details to the node-red-contrib-home-assistant-websocket palette, but node-red is unable to connect to the HA server. The node-red console is throwing up this message every 5 seconds:

[info] [server:Home Assistant] Connecting to https://192.168.1.36:8123/