Have you carefully tested for Helicobacter and also other gastro parasites..
Helicobacter can be hard to test for, blood test is not very reliable, stool antigen test possibly better, and then there is the breath test... doctors have different views on these tests...
I have zero experience with B12 injections. But seems to make some sense if blood test show severe B12 deficiency and B12 supplements do not help t... Ask you doctor, if you have B12 deficiency on blood test doctors should be willing to help you with try to get B12 level up.
best is to detect and get rid of the bugs that hinder the B12 uptake. but easier said than done.