I'm not sure if this helps your specific problem, but I just encountered a very similar issue trying to deploy an App Service Plan using a Bicep template.
I had specified the location as resourcegroup().location, which resolved to "australiaeast", and the error returned was
The provided location 'australieast' is not available for resource type 'Microsoft.Web/serverFarms'. List of available regions for the resource type is 'southcentralus,msftwestus,msfteastus,msfteastasia,msftnortheurope,eastus2stage,centralusstage,southafricanorth,westus,brazilsouth,southeastasia,centralus,japanwest,centralindia,uksouth,canadaeast,koreacentral,francecentral,northeurope,westus2,eastus,westindia,eastus2,australiacentral,germanywestcentral,norwayeast,uaenorth,swedencentral,qatarcentral,switzerlandnorth,northcentralus,ukwest,australiasoutheast,koreasouth,canadacentral,westeurope,southindia,westcentralus,eastasiastage,northcentralusstage,westus3,eastasia,japaneast,jioindiawest,australiaeast'.
australiaeast is in that list, so what's the big deal, I wondered. BUT - it turns out it's a red herring. The location parameter for an App Service Plan needs to be specified as the friendly name of the location. In this case, "Australia East", not "australiaeast". When I changed it, my deployment succeeded.
I hope the cause of your problem is similar and that this information helps.