Yeah I think that generally (of course there are exceptions to any rule) and overall, attacking players are simply and clearly better footballers than defensive midfielders, defenders or goalkeepers.
It is far more difficult to score than it is to stop the other team from scoring. A very small percentage of goal-scoring opportunities actually result in goals, and even if Man City, Juventus, Bayern etc. win a game 4-0, they'll probably have missed numerous other clear-cut chances in the same game.
Far more people growing up wanting to be a world class attacking playing than a word class defensive midfielder, defender or goalkeeper, as there is far more glory in scoring and creating goals than preventing them. So in terms of pure numbers the best attacking players in the world will generally have had to beat more competition from youth level onwards to get to where they are. Also again while there of course are exceptions to the rule, I think many more attacking players could adapt to play in different, defensive positions than vice versa.