While the helium in balloons does get lost, it doesn’t exactly float into space. It is light enough to drift to the upper atmosphere. Helium wouldn’t get into space on its own if it leaked from a balloon, but the Sun shoots out particles that churn up the upper atmosphere.
This can rip out some helium into space. Although this doesn’t happen to most helium, it’s still nearly impossible to retrieve it out of the air.