There seems to be much confusion around the subject of supplementing B12 when on a PPI and, according to my GP, understanding is still developing. I have copied this from a medical forum - I couldn't post the whole discussion.
The Rotherham NHS Foundation Trust
PPIs may reduce B12 absorption from natural food. This is because B12 in food is protein-bound. Gastric acid and pepsin are required to break the bond and liberate B12. The next crucial step is for the B12 to bind to intrinsic factors (IFs). Only then B12 will be absorbed.
My theory is : If B12 in modified or fortified supplements (unlike the one in natural food) was not protein bound, and if IFs are intact, then B12 can potentially be reliably absorbed in individuals on PPI therapy.
This link is concerning the absorption of magnesium. It is very detailed but if you scroll down to the 3.3 section it gives findings on trying to restore magnesium in severely affected patients.
https://onlinelibrary.wiley.com/doi/10.1111/apha.13846?af=RThere is also some discussion around the nasal route for supplementation of B12 which would be absorbed well. The whole subject of whether or not various acid depleting medications do rob the body of nutrients is still very hazy.
Taz x