When it became clear that the pandemic was going to become a serious issue in America, social distancing quickly became one of our most crucial early weapons to protect ourselves against the virus. Most office workers who could work remotely were allowed to do so and transitioned quickly. In the beginning, most assumed this would be a very temporary measure.

But as the ongoing pandemic forced many companies to repeatedly push back their return-to-work dates, office space investors became increasingly concerned about the longer-term impact. If working from home flipped from a temporary safety measure to a nationwide lifestyle change, what would become of their investments?

Today, the debate over whether offices are on their way out for good continues. But the latest return-to-office numbers are out, and they suggest that we may have been approaching this question all wrong. Rather than a broad yes-or-no question with an answer that can be applied nationwide, it appears this is a question that needs to instead be asked on a city-by-city basis. With that in mind, let's look at two cities where office space is likely a strong investment right now, as well as one city where it may not be.

People in office at conference table during work meeting.

Image source: Getty Images.

Texas for the win

According to new data from office security company Kastle, Austin and Houston, Texas, are leading the nation in the return to office with 60.4% and 55.7% office occupancy, respectively.

Austin 

Austin is the nation's leading return-to-work city by quite a bit, with a significant lead over first runner-up Houston. In addition to being the state capital, Austin is a burgeoning hub, with many major companies now having a significant office presence there. The city has even seen significant growth in its younger population as a result.

Houston 

Houston's appearance on this list could be a bit surprising, since the city had one of the highest office vacancy rates in the country at the start of the year. But now new office development is slowing to a crawl to eliminate the oversupply issue. As the demand for fuel heats up, Houston's role as a major energy hub will mean more office use. And like Austin, Houston is also seeing tremendous population growth.

San Francisco blues

As of April 27, San Jose technically has the lowest office occupancy of the 10 major metros Kastle tracks, at 34.2%. But San Francisco is barely beating it with 35.4% occupancy, and there's reason to believe the future may be brighter for San Jose's office space than it is for San Francisco's. For starters, San Jose's one-week office occupancy growth from April 20 to April 27 was 3.1%, whereas San Francisco's was a mere 1.9%.

San Francisco's status as the most expensive U.S. city to live in is hurting it in many ways right now, and office space is no exception. Workers are taking advantage of the availability of more remote opportunities to move to less-expensive areas.

Should you invest in office space?

It's worth noting that this is traditional office space we're talking about. Many remote workers are less than comfortable working from home for a variety of reasons, such as having small children home all day, not having enough space to set up an office, or simply needing that mental cue of leaving the house and going somewhere separate from the rest of their lives to focus and get their best work done. That's why co-working spaces may still be well worth investing in, no matter where you are.

Investing in traditional office space could be a great opportunity as well. You'll just want to pay close attention to what's going in the city you're looking to invest in. Likewise, if you want to buy into office real estate investment trusts (REITs), you'll want to pay close attention to the geography of their portfolios.