IBM has been the company with the most patent registrations in the US for I think 29 of the last 30 years. They're one of the largest industrial research organizations in the world. They're doing more hard science research than almost anyone else.
The money-making parts of IBM are: legacy software and hardware (declining), consulting (low margin, low leverage), enterprise software (mostly redhat, not really growing). It's hard to explain how IBM research is accretive to any of that.
They were the second American chip company that said no to Steve Jobs when hinted about designing smaller better chip mobile devices the other two were Motorola and Intel Apple had to eventually do it themselves. Apple Silicon
They are also betting on quantum computing to become commercially relevant.
Sometimes you might hear private partnerships quote gross margins in the 40s or 50s but that’s implicitly gross of partner labor and comp so it’s not apples to apples.