Depends on the vaccine - when you vaccinate, you are injecting the virus into your body - some are dismantled into pieces of virus, others are the full virus. Some viruses, like the chicken pox virus varicella, will never leave your body once inside. It hides in beside the nerve cells that have low blood flow and therefore low immune function, and wait to re-emerge (as shingles). So it depends on what it is finding, and then you have to know how that particular vaccine is made in order to make the discernment that it's from a vaccine or not.
For more details, please check the link: