Not all industries will be equally impacted by WFH. SF is being gutted because the only equipment a programmer needs is a computer. If you're looking for a healthy metro area that will weather the WFH realignment, look for one whose primary industries require equipment that you can't pick up at Best Buy. Things like healthcare, biotech, and research universities (just to name a few) will still require butts in seats. Off the top of my head, Boston, Pittsburgh, Cleveland will be fine. NYC might be impacted because of the finance industry, but it's also plenty diversified.
(Furthermore, in the long term SF will be fine because the geography and climate is beautiful, and people will always be clamoring to live there regardless of industry, in the same way people desire to live in Honolulu. But it's in for a rough time in the near term as the tech industry diasporizes.)