Start by checking the name resolution from on-premises. Verify that the name of the web app resolves from the on-premises system you are using to a private IP address, not the public one assigned to the web app.
Your on-premises DNS servers must be configured specifically to resolve private Azure DNS zones to support connectivity via private endpoints.
Details at https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns-integration and at https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin