Let's say you tap a note right at the 12th fret. As your finger taps the string against the fret, a vibration rolls longways down the string and hits the bridge saddle and rolls back, and touches the string still pressed against the fret and rolls back and forth and back and forth, and slowly the audible note dies out as the vibration dies out. It's like tying a rope to a tree, then stretching the rope almost tight, and then shaking the rope. With a rope you can see the wave travel to the tree and come back.
This is all happening rather fast. As you lift your finger off the fret, the moving vibration can now fly all the way down to the nut and back. Your finger is deadening it in the middle, but that's just the way you go about intentionally creating a harmonic -- for example you touch the the string at the 12th fret while you pick the string.
One way to stop this from happening is to have a string deadener somewhere between your finger and the nut. Good string deadeners include: a silk tie, a strip of fuzzy velcro, fuzzy dice hairy material, chamois leather, thick felt, or (the best) a strip of the rubbery stuff sold at the hardware store as a shelf liner so plates won't move around.
To interfere as little as possible with your playing, you install the sound deadener between the nut and fret number one. Either run the material beneath the strings, or weave it over and under, or do both.
Now when you tap and let go the note will die instead of turning into a harmonic.