Share buyback is the same as giving dividends - except the share holder doesn’t have to pay taxes until they sell. To the company, they spend the same amount on share buyback vs giving dividends. I don’t see how this argument holds up.
Further more, while some might argue that corporate R&D is better due to being closer to the problem but it is private research and not shared with the world like university research is.