Ive never been able to do incline bench without my shoulder hurting. Even when I was a teenager and had no shoulder issues, that movement still hurt
You could experiment with different heights on the incline and grip width. Also where you touch the bar on the chest seems to be a factor aswell. Alot of people do incline and lower the bar high up on their chest, my shoulders cant stand that. And when you touch the bar that high up, your elbows seem to flare aswell.
So a lower incline, closer grip and touching the bar lower on the chest, and keeping those elbows tucked in helps for me atleast.