Setting some object properties to null or empty causes deployments to fail.
Scenario, and my workaround are written up here;
https://github.com/Gordonby/BicepLessons/blob/main/EmptyObjectProperties.md
Relates to issue on the Bicep project : Azure/bicep#387