First thing that comes to mind is to confirm that the appsettings.json file is actually copied to the site in Azure. Use the file explorer in Azure to confirm the file got there.
Second thing is that the Settings portion of Azure takes precedence over any appsettings so check there next. Note that if you have DB connection strings in your settings then it should be pretty easy to confirm whether the Azure site is overwriting the existing settings or not seeing the file at all. Another thing to pay attention to is if you're using slots then check the slot setting of the root app.
Third thing is if you're using environment settings. The ASPNET environment is configured via Azure settings. So if your Azure site is configured to have an environment of, say, stage
then it'll load the appsettings.json
and then the appsettings.stage.json
over that. Ensure this either doesn't apply to you or that everything is configured correctly.
Fourth thing is that your app isn't using the standard app builder and is therefore not including the default settings file. If it works locally then I'd confirm that you didn't accidentally make this only applicable to local dev (environment: development).
Finally, confirm that your site is configure in Azure to properly use a NET 8 app. If it was previously running as NET 6 then the core site should be configured properly unless your deployment rebuilds everything in Azure as well. Under the General Settings in Azure ensure you have configured the stack for NET and the version for NET 8. Also check your other platform settings.