I changed this to be:
var initialiseConfigNodeOnce = () => {
RED.events.off('runtime-state', initialiseConfigNodeOnce);
....
};
RED.events.on('runtime-state', initialiseConfigNodeOnce);
I assume you want that code to be executed once and once only but it was being executed each deployment.
Btw in the configuration node panel, the node isn't setup, i.e. doesn't contain the current value:
Is there something else that needs to happen for that panel to be correctly setup? The html shown is from the sidebar html file, not the node definition...