B12 deficiency doesn't cause pernicious anemia, pernicious anemia is a cause of B12 deficiency, its a GI absorptive disorder (lack if intrinsic factor).
I use the term loosely in reference to all types of anaemia arising from cobalamin deficiency, as the NIH and Mayo clinic do[0][1]. After all, lack of IF is only one of the many causes and the symptoms are similar regardless of aetiology.