To start where I agree, there can be situations where a company has what amounts to free cashflow and no realistic opportunities to invest it. If that is the normal state of affairs, it should be issuing dividends.
Buybacks and dividends are the same from the company's standpoint. They are transferring $X to the shareholders with either method. But from the investor's POV, the buyback is better. If a company issues an investor a dividend they have to take that money right now. That means they have to recognize it as income even if they didn't want/need that income. By contrast, if the company increases the per-share price via a stock buyback then the investor can take that gain whenever they choose, rather than at the whim of the company. A dividend puts the timing of the income under the company's control where a buyback puts it under the investor's control, at least under current US tax law. That's why investors (and hence the companies they invest in) mostly prefer buybacks these days.
Otherwise I think they give management too much room to play games at the expense of long-term firm health, both by opportunities for self-dealing and by training investors to expect them.
They can play similar games with dividends, there have been plenty of companies that continued to pay dividends right up to their bankruptcy because that's what investors expected. Don't get me wrong, there have been plenty of shenanigans with buybacks -- like the airlines doing big buybacks before COVID then begging for bailouts when their business tanked but they can do the same thing with dividends.
Thanks for answering, the animus toward buybacks puzzled me when from my perspective (as a retired person living on investments) dividends and buybacks are just two sides of the same coin. I prefer buybacks for the reason stated above, but any ROI is good and I'll take it in any form I can get it.