How can I fix the error 'The listing is not editable, must be active or expired but is removed'?

How can I fix the error 'The listing is not editable, must be active or expired but is removed'?

This error occurs when the product you're trying to publish on Etsy has already been removed. To resolve this, follow these steps:
  1. Go to the All Products section and search for the product showing this error.
  2. Select the product, and from the Bulk Action dropdown, choose 'Unlink listing on app', then click Action.
  3. After unlinking, select the product again, choose 'Publish on Etsy' from the Bulk Action dropdown, then click Action.
This will re-upload the product to Etsy.