@Anonymous
I understand you have a requirement to create VMSS with Automatic OS Upgrades enabled. There seems to be some confusion here, between Automatic VM guest patching for Azure VMs
and Azure virtual machine scale set automatic OS image upgrades. I believe you are attempting to use Azure virtual machine scale set automatic OS image upgrades, but your implementation is the other. You will need to clarify how this policy is made and enforced because it might be limiting your ability to create VMSS.
If you want to use Azure virtual machine scale set automatic OS image upgrades, you can set this after VMSS creation with "az vmss update --name myScaleSet --resource-group myResourceGroup --set UpgradePolicy.AutomaticOSUpgradePolicy.EnableAutomaticOSUpgrade=true".
If you do actually want Automatic VM guest patching for Azure VMs, then the patch orchestration mode AutomaticByOs is only available for Windows images, information about this can be found here. You can use the AutomaticByPlatform mode but need to make sure to also set "--enable-auto-update true".
Hope this helps! Let me know if you have further questions or issues.
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.