Clear glass goes in the glass recycling skip along, as someone mentioned, with any labels. Something like half of the amount of UK plastic vs glass gets recycled. Additionally, glass in a landfill or river isn’t a potential chemical pollutant or hazard to water-life.
Plastic, though, is assumedly more cost-effective* at packaging stage, and more ‘convenient’ in many cases? That’s why we’re drowning in it. I don’t know what the future is for HDPE but it’ll still be around long after we’ve finished with it as once manufactured it’s basically indestructible.
*An upside of glass (above and beyond recyclability) food containers is a shelf-presence/appeal that is hard to match.