Say the B'racha without a head covering.
The Gra disagreed with R. Yosef Karo’s ruling (that it is forbidden to walk with an upright posture and cannot walk 4 amoth without a head covering) and countered
that one is never obligated to wear a head covering, even while
participating in a religious event.
His opinion was based in part on a
Tosefta in Tractate Megillah that stated, “A poheah can say the blessing
on Shema” (Tosefta Megillah 3:17). According to the Gra, a poheah is,
among other things, someone without a head covering.8
Therefore
one can even say blessings while bareheaded. As for the Talmudic
passage that formed the basis for R. Yosef Karo’s ruling, the Gra
interpreted the actions of Rav Huna as a middat ḥasidut, or pious
behavior beyond the letter of the law.
http://www.hakirah.org/Vol%204%20Rabinowitz.pdf
The Hid"a (Rabbi Hayim Yosef David Azulai, Israel, 1724-1806)
classified wearing a Kippa as a "Midat Hasidut" (measure of piety),
rather than a strict requirement.
https://www.dailyhalacha.com/displayRead.asp?readID=997