It's not that people don't acknowledge the "hard work " part. Most people actually do. They also celebrate and respect that.
It's the insistence that luck played absolutely no part in it and all it took was that hard work. It's comments like "unwilling ", "lazy", "victim mentality ", "personal responsibility ".
I'm not successful,but I'm ok. However ,many people with my background are nowhere near ok. Mental health issues, drug addicts, even dead (either by suicide or otherwise). I am ok because I got lucky in certain things.
Let's take Jane and Sarah. Similar backgrounds, growing up in poverty , not many prospects, but they worked hard ,studied hard ,went to uni.
Then at a critical time at uni, Sarah got raped, got pregnant, got marched into an abortion. She crashed and burned massively, severe mental breakdown, no understanding ,no support ,no help.
Jane was lucky to have the right circumstances and no traumatic /disruptive events to keep studying and get her qualifications and then keep flying high.
Sarah was extremely unlucky to "fail" uni and get no qualifications . That does not negate her hard work before. It does not negate her hard work after to simply keep going, even if she ended up with a (poorly paid) job rather than a career.
Luck plays a part in everything. From genetics, to intellectual ability, to disabilities, to home life/environment, to that one teacher that believes in you/inspires you/encourages you, to that one lucky break, to being in the right place at the right time and so on.
If you need to tell yourself it's all down to your hard work because you need that validation, fair enough. Just don't gleefully shout it out to others ,while insulting them at the same time and showing how much better you are. That kind of validation is not ok. You're not better, you are luckier.