The depletions of potassium (K) and sodium (Na) in samples from planetary interiors have long been considered as primary evidence for their volatile behavior during planetary formation processes. Here, we use high-pressure experiments combined with laser ablation analyses to measure the sulfide-silicate and metal-silicate partitioning of K and Na at high pressure (P) - temperature (T) and find that their partitioning into metal strongly increases with temperature. Results indicate that the observed Vestan and Martian mantle K and Na depletions can reflect sequestration into their sulfur-rich cores in addition to their volatility during formation of Mars and Vesta. This suggests that alkali depletions are not affected solely by incomplete condensation or partial volatilization during planetary formation and differentiation, but additionally or even primarily reflect the thermal and chemical conditions during core formation. Core sequestration is also significant for the Moon, but lunar mantle depletions of K and Na cannot be reconciled by core formation only. This supports the hypothesis that measured isotopic fractionations of K in lunar samples represent incomplete condensation or extensive volatile loss during the Moon-forming giant impact.