Judge rules that US president, Department of Justice misused courts in settlement that led to 'anti-weaponization' fund.