The UK’s highest court has rejected the Treasury’s attempts to intervene in the landmark case.