You can see that many object in vSphere are protected due to design or due to other software like VMWare Horizon that prevent editing. In case of faulted componets or some other reason you shoul have orphaned and uneditable VMs.
How can we soldi this problem? Just followind this steps
Connect with web browser to https://<vcsa>/mob

Click in content and then rootFolder

Then click on childEntity

Then search for vmFolder

Under childEntity check the vm-id

If you want to remove VM with id vm-51 just do the following steps:
Connect to vCenter with SSH and enable shell access
shell
Connect to the vCenter Server’s Postgres Database
/opt/vmware/vpostgres/current/bin/psql -U postgres
Connect to the VCDB.
\connect VCDB
Do not forget the \ before connect
Show all protected objects running the following command
select * from VPX_DISABLED_METHODS;

Delete the entry for the VM you wish to edit
delete from VPX_DISABLED_METHODS where entity_mo_id_val = ‘MO_ID’;

And finally restart the vCenter Server Service
service-control –stop vmware-vpxd
service-control –start vmware-vpxd
After that you can click in the VM and remove from inventory