If you remove/unregister from the ESXi web console or vCenter server directly, Horizon View Connection server doesn't know about it and think it still exists.
If you remove/unregister from the Connection server middle of connection interruption between Horizon servers and the vCenter, it may cause the VM to still be registered in the vCenter and doesn't remove them really. So remove operation of a VM from VDI desktop pool needs to knowledge of both vCenter and Connection Servers and database VDI and vSphere must be informed of this action, otherwise, you need to remove them by connecting to that mentioned databases. (Sometimes PowerCLI cannot find object of that VM if it's not belong to your virtual datacenter anymore )Please mark my comment as the Correct Answer if this solution resolved your problem
Thank you Amin. Good explanation of the cause and process.