I don’t know the answer, but the official instructions for a similar scenario (switching add-ons) are to open the re-configure page without disabling the integration prior to switching to a new server, see step 4 at https://www.home-assistant.io/integrations/zwave_js/#how-to-switch-from-z-wave-js-to-the-z-wave-js-ui-add-on. Apparently having the UI dialog open allows you to re-configure regardless of the current state? (Those instructions don’t make sense to me since both add-ons would be running…)
For post-reconfiguration, unless it was the core-addon, you could try enabling the integration again, and it will fail to connect, then maybe you can re-configure it at that time.
Or while it’s disabled you can add it again setting the new URL and then enable it, as described at https://community.home-assistant.io/t/switching-z-wave-js-addons-with-minimal-downtime-z-wave-js-official-to-z-wave-js-ui-community/409904#p-1836792-step-9-reconfigure-the-z-wave-js-integration-19.