The solution that follows assumes that you have removed all duplicate url keys of products and there are none left in the system.
Cause
In addition to the attribute 'url key', there is another attribute 'url path'. You cannot see it in the backend, but it is present in the database and must be unique (if it is there). There is a type for 'category' and one for 'product'. They each have a separate attribute ID.
In our case there was a bug in Magento 2 that did not adjust the url-path when copying a product. Therefore it was not unique. For the url-key you can see this clearly because Magento puts "_1" behind it.
Solution
1.Find the attribute ID in the database in the eav_attribute table that matches 'url path' and is the product variant.
SELECT * FROM `eav_attribute` WHERE `attribute_code` LIKE 'url_path'
Click through on the 'entity_typ_id' to deduce which is the product variant
2.Use the ID to search the catalog_product_entity_varchar table for all records with this ID; and delete.
DELETE FROM `catalog_product_entity_varchar` WHERE `attribute_id` = [ID attribuut]
3.Run the indexer in CLI
bin/magento indexer:reindex