Scotland’s highest court says Boris Johnson, in effect, misled the Queen over the move.