With a fresh ERPNext: v12.4.1 (version-12) Frappe Framework: v12.2.1 (version-12)
install this is to confirm this bug report https://github.com/frappe/erpnext/issues/19539
Cannot delete or cancel because Company XYZ is linked with Shopping Cart Settings
Went to shopping cart which is not enabled.
I still cannot delete the company.