The Tefillah is recited PRIOR to entering the Privy and maybe found AFAIK verbatim in TUR Orach Hayyim 3
The SA OH 3:1 mentions it and states "now we are no longer accustomed to say it"
The quoted sources in Be'er Haggolah
1 to say: Talmud Brachot 60
2 to omit: Bet Yosef
[Note: I have not recently seen this BY inside]
1 How can the BY omit a Talmudically mandated prayer?
2 Why don't we restore it?*
A) The Shaarei Teshuvei quotes Arizal to restore it.
B) Artscroll and others restored the Talmudic "birkat Ba'al habayyit" which was neglected for a long time