At the sun's surface and below, the H is a plasma
Plasmas behave differently from gasses and liquids. There is no reason to expect that an element that is visibly transparent in one phase will be transparent in a different one.
Note also the density of the H on Sol.
Note also the temperature of the H.
