The ruling was a surprise win for the pro-democracy media tycoon, who was sentenced to 20 years behind bars this month on collusion charges under a Beijing-imposed national security law.