If I'm reading your question correctly, your suggestion is that Mercury, having a small magnetic field, should have some atmosphere, perhaps more atmosphere than Mars, with no magnetic field, though Mars does have some surface generated magnetic field regions, it just lacks a field generated by it'sits core.
Solar stripping due to no magnetic field isn't the only factor in maintaining a planet's atmosphere. There's also thermal escape or Jeans escape, which happens when the upper atmosphere's gas molecules move fast enough to escape the planet's gravity. It's a byproduct of temperature and escape velocity.
Additional factors probably play a role, such as outgassing or how much atmosphere there was to begin with, or very large meteor impacts.
Jeans escape can happen whether there's a magnetic field or not. Mercury has the hottest upper atmosphere temperature of the planets (Venus has hotter surface temperature, not upper atmosphere temperature), and it has the lowest escape velocity, so it's the worst of the 8 planets at maintaining an atmosphere. Based on temperature and escape velocity, Mercury loses CO2, which is the heaviest common gas, so, even if Mercury had the strongest magnetic field imaginable, it would still lose it'sits atmosphere.
Mars is much colder with a slightly higher escape velocity so it maintains it'sits atmosphere better, at least against thermal escape. Mars should retain most of the CO2 and perhaps it'sits N2 as well, but a strong solar wind can strip a planet of gas molecules that can't escape thermally, so both methods of atmospheric loss should be considered.
Mars very likely once had an atmosphere. It'sIts polar ice and dried up river beds support that conclusion.
Assuming it had them in the past, Mars may have lost it'sits lighter gasses, such as Ammonia (NH3), Methane (CH4) and Water vapor (H20) as a result of atmospheric escape even before it lost it'sits magnetic field.
Mars may have also lost a share of it'sits atmosphere during a giant impact.
And, while not directly related to your question. Mercury doesn't really have what I'd call an atmosphere, it has an exosphere, which some people call an atmosphere, but I think that's poor terminology. Mercury's exosphere is created by the same process that stripped Mars of it's atmosphere. The: the solar wind.
In the case Venus, while it'sthe induced magnetic field is considerably weaker and reaches less far from the planet than Earth's, it provides some protection of Venus'Venus's atmosphere. Stack exchange question on that here. I think the answer could go into more detail, but it gets the gist of it.
Venus actually is losing atmosphere to the solar wind, but it has enough that the rate of loss hasn't stripped the planet, and may not happen for a long time, perhaps when the sun expands a bit . . . but I'm just throwing that out there).
I don't know how precise the data is on this, but Venus'Venus's magnetic field offers some protection, so does Venus'Venus's gravity relative to Mars'Mars's and the vast amount of atmosphere that Venus has also offers some protection. Solar stripping is based on collisions, so a solar particle is likely to only remove one gas molecule. (kinda/sorta). The solar wind is pretty dispersed, so it takes a long time for solar stripping to have an effect. II feel I should add that to my knowledge, thethat Mars lost it'sits atmosphere to solar stripping is generally agreed with but not 100% certain. II personally like the big meteor impact as playing a role too, but I'm mostly guessing.
To get a better model of atmospheric loss, we'd need to know what the planet's atmospheres were like billions of years ago, and we don't have that information, so there are some unknowns on the rates of loss.