Weird URL when using Routes.yaml

I tried this Routes.yaml it actually hides the duplicate post in the homepage (If already visible in Featured section) but as you can see in the below screenshot. It makes the URL weird and clicking on it opening 404 page.

Old Thread: How to avoid duplicate posts on Homepage?

    permalink: /{slug}/
    template: index
    filter: featured:false

To specifically answer your url question, this is happening because the featured posts are not being assigned a route, which means they don’t have a URL. Therefore, the preview URL is used since there’s no other option