The ruling is likely to leave the Duke of Sussex with a large bill to pay the UK government's legal fees, in addition to his own lawyers' costs.