The Duke of Sussex has settled his legal claim against the publisher of The Sun, with his barrister describing the agreement as a “monumental victory”.