Upgrading NSX 4.x to 9.x via the NSX UI (outside of a VCF installation) is not supported.
NSX 4.x must be imported into VCF prior to being upgraded. See Direct upgrade of NSX 4.x to NSX 9.x is not supported for more details.
If this issue is encountered, a new NSX instance must be deployed/configured and the proper upgrade path utilized. Restoring NSX from a backup taken prior to the 9.x upgrade can help to speed up the recovery.