In SA Orach Chaim 187:1 in Mishnah Brurah Sif Beis, he writes that the phrase in Birchas Hamazon should be 'Bphi' kol chai and not 'Bphe'. Anyone have an idea why?
From what I can tell, the original was בפי and then it was changed to בפה, and then later changed back to בפי. Some details:
Grammatically, we'd expect בפי here, since the word meaning "mouth" is in construct state (בפה means "in a mouth", בפי means "in (the) mouth of"; the latter is correct here). Similarly, in ברוך שאמר we see בפי עמו, in אל אדון we see בפי כל־נשמה, and in the non-weekday after-bracha on haftara, we see בפי כל־חי. The word פה in all these cases would appear to be ungrammatical.
A popular explanation for the form בפה in ברוך שאמר that is due to the Ari: changing from בפי to בפה to allude to the 87 (gematria of בפה) words in his version of ברוך שאמר, allowing a further allusion to ראשו כתם פז (Shir HaShirim 5:11; the gematria of פז is also 87; this allusion appears in earlier works by the Ḥasidei Ashkenaz). The Ḥida, while surprised at the Ari's ungrammatical change, brings a kabbalistic reason for saying בפה. However, R. Shabtai Sofer and R. Shlomo Zalman Hanau, authors of very popular works on the siddur, came out strongly against בפה, and support בפי in their texts. See Naftali Wieder's article1 on this topic for many many more details on the back and forth. At the end of the day, the Ari's בפה was accepted by the Magen Avraham, the Peri Ḥadash, Aruch HaShulḥan, and other more modern halachic decisors.
On the other hand, Wieder shows that the version בפה preceded the Ari, and was in fact the majority reading among French/Ashkenazi siddurim from the 13th century on, at latest. There also seems to be no relevance of בפה to the number of words, as many versions of ברוך שאמר had a different number of words. More on topic for this question, בפה appeared additionally in all four spots in question (ברוך שאמר as well as אל אדון and ברכת ההפטרה and ברכת המזון).
Instead of the common explanation, Wieder proposes that the change from בפי to בפה was due to a vulgar meaning of the word fi in Old French and Old German (and probably in many old Romance languages): it meant "fie", an exclamation of disgust (see here). You can see how it would be inappropriate to say מהולל בפי עמו and מבורך בפי and יתברך שמך בפי with that meaning in mind!
As support, Wieder cites Maharam MiRothenberg as requiring a dagesh in פי (so it would be pi, not fi) in כי פּי ה׳ דבר (in על הכל when taking out the Torah), and the Tashbetz writes that this is so as not to curse God. Similarly, the Minḥat Shai writes that there were those who wanted to say פּי (pi) instead of פי (fi) in Devarim 8:3, to avoid cursing God.
As another example of this phenomenon, Moshe Bar-Asher writes2 that in certain Iraqi texts of נשמת, we see the text of וה׳ ער לא ינום ולא יישן vs. the text of וה׳ אלהים אמת לא ינום ולא יישן. The former text was apparently changed to the latter text because ער means penis in colloquial Arabic.
Wieder further brings examples (including modern siddurim) where בפה and בפי stand in the same volume (sometimes with a difference between חול and שבת!). He writes that the tension involved in grammar vs. kabbalah and tradition (even if it's a recent tradition) leads to such inconsistencies. In general, in modern times, many Ashkenazi decisors and the printed siddurim have mostly followed the views of the grammarians (like Sofer and Hanau, among others) who have "corrected" the text of the siddur to be more grammatical (in their eyes). As I wrote at the beginning, בפי is certainly more grammatical in all the locations, and has become more and more popular. For example, the Artscroll Ashkenazi siddur I have here reads בפי for all but ברוך שאמר (probably to follow the Ari), whereas the Koren Ashkenazi siddur I have reads בפי for all four.
1 תיקונים בנוסח התפילה בהשפעת לשונות לועזיות by נפתלי וידר, p469 in volume 2 of התגבשות נוסח התפילה במזרח ובמערב.
2 לשוננו רינה by משה בר־אשר, p190. [I haven't seen this inside, just seen the quotation.]