Cough syrup is swallowed. The medicinal drug goes to the stomach. Is there any reason to believe that there is benefit in ingesting the medicine as a syrup? Wikipedia anyway writes
“There is no good evidence for or against the use of over-the-counter cough medications in those with a cough.”