The Highway Code is not strictly law. I think OP has editorialised the title sensationally.
So in the Highway Code, if it says Must or Must Not , then its law.
Expand the section called "Wording of the Highway Code". https://www.gov.uk/guidance/the-highway-code/introduction
Unfortunately despite all the UK Gov website cheer leading on sites like this, I cant provide a link to the expanded section in question!
Magistrates will take the above as Law, its one of those grey areas of law, so selective application of the law exists, and thats before you even get into a debate of whether you have a say in the laws that you are born under if you havent moved abroad.