After patching ESXi successfully.
The following warning is received "Host is not in compliance with the attached profile" post patching which cannot be cleared.
A legacy host profile is attached to the affected host.
Message may also be present when you switch to Life Cycle Manager.
VMware vSphere ESXi 6.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
After patching ESXi to a new build, the attached host profile which has an old build will have the conflict.
Further information: Attach or Detach Hosts and Clusters to a Host Profile