When corals bleach because the ocean becomes too hot, it’s the algae living within the corals that are stressed by the high temperatures. This stress causes the coral to expel the algae, so the corals lose their color and usually die without the benefit of the symbiotic algae.
Most algae that live in corals are members of the genus Symbiodinium. In the Eastern Pacific off of Panama there’s a different alga that lives symbiotically with some corals, and this species is more heat tolerant. When heat waves hit the reef, corals that absorb heat tolerant algae survive and actually become more abundant. Hopefully this adaptation will save some reefs in the future as the ocean gets even warmer.