This issue can occur if an upgrade of an ESX host was done outside of SDDC, from LCM on vCenter instead - for example.
The API calls described in the article below are run, and appear to run successfully per the SDDC Manager UI - Tasks list -
https://knowledge.broadcom.com/external/article/324050/synchronize-inventory-versions-after-out.html
However, the ESX host version in SDDC Manager is not updated to reflect the actual ESX version running on the host.
VCF 5.2.1
The behaviour being observed is expected behaviour - only if an ESX upgrade was initiated via SDDC Manager UI, but then stopped.
The upgrade is then seen by LCM as a failed upgrade.
The isVersionSyncRequired function does not currently check for failed upgrades.
If upgrades were done OOB (as is the case described here), the upgrade bundle will be available and the logic currently prevents version sync.
The two workarounds offered are -
1. Use the async patch tool to sync the inventory on the SDDC Manager.
2. Apply the ESX upgrade bundle that is the version currently running on the ESX hosts again via the SDDC Manager UI (the workflow will identify that bundle has already been applied and then the version sync will happen).
Either workaround can be used to have the ESX host version successfully reflected in the SDDC Manager inventory.