I have a custom site design/site script to apply branding to SPO modern sites. I've also applied it to the default site design (Add-SPOSiteDesign -IsDefault). It's automatically applied to new sites. The site script changes the Header to compact layout and adds the gray background. It works 80% of the time. Every once in a while, the site will still have the Standard layout and the white background. I updated my provisioning scripts to explicitly run Invoke-SPOSiteDesign. I still see sites with the wrong header. If I check the Site Designs from the web UI, I see that it was applied twice. If I apply the same site design for the 3rd time using the web UI, then it finally changes the Header. It works fine the first time for most but there seems to be a glitch where it fails around 20% of the time. I'm on the Government cloud (GCC). Has anyone experienced a similar issue?
@ErkanCh I can confirm that I have also previously experienced this same ratio of inconsistency (failing or malforming around 20% of the time) using site designs and site scripts, on tenancies not associated with the GCC. When I did have errors, it seemed to disproportionately present errors relating to either the header or navigation. I've yet to find a reliable workaround other than moving over to PnPProvisioningTemplates instead!