The Product lookup tables did not work, and the switch the team did not work either.
But I manage to reproduce the problem in a test environment.
If you uninstall WooCommerce, drop WooComerce tables, keeping products in wp_posts and wp_postmeta and Reinstalled WooCommerce. The same problem occurred for all products.
In wp_postmeta, product_type is external
But in edit mode in GUI Product data is now Simple Product instead of External/Affilate