It's a NSW example, but the
Sydney Morning Herald posted an article about some of the school's in NSW's lowest 25% (socioeconomically and academically) had students that achieved ATAR results that paralleled those of our highest 25% ranking schools. The article sites Gina Elton, the dux of her low SES school in 2016, living on a farm, had to take a 1.5 hour bus each way to school, one of eight children, and her trek to medicine at Uni. I suppose it's a feel good story.
I think something that is crucial to the debate is the academic culture of schools. Usually, high income from parents (which usually correlates with high studies themselves) cultivates a culture of academia being perhaps not even just the norm - but expected/admired. When you have a community of like-minded students, the academic culture makes a huge difference. I think that in a high socio-economic school where teachers are spending less time disciplining students, trying to prove to them their studies are important/worthwhile, as well as spending less time assisting students overcoming motivational barriers when their home-life isn't exactly geared towards academia, the results are higher. I had a few exceptional teachers, but I largely think that my teachers at my mid-to-low SES school spent more time than they'd like to discipling distracting behaviour, discipling uniform, trying to convince students that studying will be to their own benefit, and my most dedicated teachers really tried to do all in their power from a school perspective to make time in school super effective, because time at home for a lot of students wouldn't be very academically-encouraging.
My sister is moving from the High School I went to, to a Grammar school, for her senior studies. She'll do the IB, not HSC. From the few short experiences she's had at the school so far, she can't believe how many times a day they say "scholarly." Even though the school is only about 20 minutes from my own, the school fees are 5x the amount they were at my school, and they have a smaller cohort than my school, and 40+ ATARs over 90 each year. My school had 5 ATARs over 90 in a cohort of about 120. The culture is different at the Grammar school...being studious is expected and admired.