First you should call your vet and ask if this is a side effect of the medication. If so, the vet might be able to work with you to find a different medication that would work well without this side effect.
If it isn't due to physiological reasons, you might try working on your technique for giving the medication. There might be a way to hide it in treats, or give treats before and after so it becomes a less stressful experience. Or your attitude and body language while giving the medication might need tweaking; once you can be calm, confident and quick when giving medicine, it helps the cat's attitude toward the experience.