Not sure how true and haven’t tried it, but my gp said oral was not much use because Metformin just strips the b12 out.
In the trial I linked to, they measured a 19% reduction, so not a complete strip. Also given the apparent fact that the deficiency takes prolonged use to build up to being a problem, then the effect is fairly gradual over a long term. Certainly if you have been diagnosed with iron deficiency anemia, then an injection is a quick fix. My GP increased my iron and folate intake to let my levels come back more gently.
There are diets discussed on the forum here that exacerbate the risk of deficiency. For iron to be absorbed from food, we need to have edible iron, folate, and Vit C all present at the same meal for best absorption. This is especially true for iron supplement pills to work too and many GP's (mine included) do not mention this when prescribing iron.
Not all forms of iron can be digested, so for example, spinach is full of iron, is a green veg, but is apparently not compatible with our metbolism, so actually does not work at all for us. Similarly 6" nails is not a solution either.
Folate can be difficult to source naturally too. Some diets for T2D especially cut out fruit, so vit C intake can be low. Other diets reduce or cut out animal products, so do not provide either folate or B12 in any significant amounts.
This is why by law most commercial cereals, breads, pastas, flours all have added vitamins, but again some diabetic diets reduce or eliminate these products.