The Duke of Sussex is contesting a decision to change his security status after he stopped being a working royal.