Prosecutors must return evidence seized from a key figure in the dismissed criminal case against former FBI Director James Comey, a federal judge has ruled.