I checked some online dictionary and found that the pronunciations of p in dispatch and dispatcher are a little different. What's the reason or pronunciation rule for this difference?
Dispatch (as a verb) has stress on the second syllable; dispatcher has stress on the first. English unvoiced stops [p], [t], and [k] are heavily aspirated at the start of a word, and somewhat in stressed syllables. Consider the difference between the first and second /t/ in potato.
I note that you're located in Beijing: consider Standard Mandarin, where there's no difference in voicing between 大 dà and 他 tā, where /d/ = [t] and /t/ = [tʰ].