Ensure the preferred domain includes the www subdomain.
Check the DNS configuration to ensure the CNAME or A record for the www subdomain is correctly pointing to your Azure App Service.
Check any rewrite rules or redirect configurations affecting the www subdomain.
Check SSL certificate is properly set up for both the naked domain and the www subdomain.
Follow above test it might resolve your issue.