Surely this is not the case, otherwise I wouldn't hear the constant refrain of "opex > capex" over the past decade, as sung to argue SaaS is the best thing.
Opex is "better" than capex, because cash is king. Capex in general means you pay upfront and reap benefits later. Opex in general means you reap benefits now and pay later (via invoice or credit card bill).
Apples to apples CapEx is better for the reason I described. The shift to OpEx and the rise of SaaS is more attributable to short-term budget flexibility. Taking depreciation is a tax advantage but only because the thing you own is depreciating. It's not free money. Capital expenditures usually require a large upfront cost, slow time to market and unpredictable scaling and maintenance. SaaS is usually turnkey, can scale up and down to match usage, and has less lockin. The benefits frequently outweigh the tax disadvantage.