magento2 – Inconsistent product URL

I have a problem in Magento 2.2.0 and Unero Theme 1.3.2 where there are products that have a URL like:

https://example.com/catalog/product/view/id/440/s/product-url-key/57/

and the others are:

https://example.com/product-url-key.html

I am checking the status of the SEO setting in the catalog setup, but I think it is already correct in the store display level setting.

Configuring the SEO store view

And these are the SEO parameters in the catalog -> product itself
SEO product settings

I am currently in the early stages of developing and learning Magento programming. Does it need code modification in the kernel / theme? Or is there a problem with the configuration?

The expected result is the second where there is .html in the product URL