I’m not 100% sure I follow what you mean, but here is a link from NASA saying our magnetosphere protects the atmosphere from erosion https://science.nasa.gov/science-research/earth-science/eart...
In addition to his Venus example, Mars lost its atmosphere because it's gravity was too small. Not because it lacks a magnetic field.