Cannabis is a hyperaccumulator plant where tissue samples have shown a huge plasticity of how much elements can end up in roots, stems, leaves or buds. The plant will, e.g., "mindlessly" assimilate all chloride far far beyond its needs, up to the point of toxicity, or even death, somewhere close to 200mg/l Cl.
It stands to reason what the roots don't find in the medium will not be there later.
With some elements, it's of almost no negative consequences when these will mostly not make it into the consumable endproduct, remaining in roots, stems.
Some toxic heavy metals will preferably be accumulated in the terminal shoots, thus, also buds, esp. Cadmium. A number of these are actually essential nutrients which have quite a low range between deficiency and toxicity, where esp. certain minerals can bring these in in too great amount.
Flushing doesn't wash out elements out of plant tissue. If you want to not overaccumulate elements then feeding on point of what's needed short of running into deficiencies is the better method. Not fertilizing for a certain period before the cut can help dillute the nutrient reserves that is present in mostly leaves, and the sap.