I have duplicate home page, How Can I fix it?

Using some website audit tools I found that it says a lot that I have a duplicate content like so:

https://example.com/ https://example.com/index.php 

in my sitemap I only have:

<url>   <loc>https://www.example.com/</loc>      <xhtml:link rel="alternate"                hreflang="it"                href="https://www.example.com/"/>     <xhtml:link rel="alternate"                hreflang="en"                href="https://www.example.com/en/index.php"/> </url> 

I don’t know why google splits it up into two links. How can I fix it?

(PS https://www.example.com/en/ and https://www.example.com/en/index.php doesn’t give me this problem )