I've had similar odd experiences with this type of operation as well. I have one line in the RunOnce portion of my customization spec that runs perfectly for manually adding a new route to a secondary NIC, but the second line never seems to fire off where I restart the machine. I've tried any number of variants of shutdown, powershell Restart-Computer etc., but it never seems to fire.
I'm still working on it and you're not alone.