I think the Cambridge family would have been damned if they did and damned if they didn't obey the rules anyway.
I suppose all countries have their cultures and societal rules and we have ours. I understand dress codes and agree with them - but there are circumstances - like this oppressive heat wave - when common sense should dictate that they are relaxed. Everyone knows that anyone can still look smart but casual. A short sleeved, open neck shirt - without a jacket would have been more comfortable for the boy (and his father).
In Norway, no-one dresses up to go to work - unless they are going to a Meeting - but they dress up to the nines if they go out to eat in the evening, even if it's only for a pizza! I had occasion to go to the local police station office - those not in uniform were all wearing jeans and t-shirts (no collars and ties), but not 'ripped' jeans and not crumpled, scruffy-looking t shirts.
Each country to their own.
I am not a Monarchist at all, but I feel a certain sympathy for Catherine and to a lesser extent, William. Her hair, her make-up, her dress sense, her weight, every move, every gesture... all under the speculative glare of the obsessive media photographers and journalists. But, I guess, that's part of her role and she has to live with it, however it must be oppressive at times.
She would have been criticised by some if she hadn't dressed her eldest son in the traditional dress code style, and condemned by others for doing so. Basically, she's never going to 'win' and, as a female, she's going to go on being scrutinised, and the speculation over her appearance and how she's raising her family will be endless. Another reason why, ultimately, the whole idea of Monarchy is up for discussion. I'm not vehemently opposed to it and hope it will gradually diminish in an 'organic' and natural way, and I wish no harm on the RF, but I believe their end is, ultimately, on the cards.