I had this issue deploying my Azure Function App + related resources via PowerShell & bicep-templates. When I created a function app in portal to the same RG, there was no issue.
This is what was wrong with my automated deployment:
Even though my deployment also contained ensuring a storage account and configuring the Function App, I had missed automating the configuration of storage account connection string for my function app.
If you're experiencing the issue that App Keys are stuck on loading for your Function App, one thing to check from your Function App configuration is that a key AzureWebJobsStorage exists and has the storage account's connection string as its value.
This worked for me. Right after I configured the mandatory storage account connection for my Function App, immediately App Keys page started listing the default and master keys for me.