It’s not that certain plants retain vitamins better than other plants, it’s just that they contain different chemical compounds to start with. There are many different carotenoids that plants can possibly have, however only a small subset of carotenoids (e.g. α-carotene, β-carotene, and β-cryptoxanthin, etc) actually have vitamin A activity.