According to Habitable Planets for Man, Stephen H. Dole, 1964, a planet needs an escape velocity several times as great as the average speed of atmospheric particles in order to retain them for geological periods of time.
https://www.rand.org/content/dam/rand/pubs/commercial_books/2007/RAND_CB179-1.pdf
According to table 5 on page page 35, the ability to retain atmospheric gases depends on the ratio of the escape velocity to the root-mean-square of the velocity of the atmospheric gas particles.
Where the ratio is 1, the lifetime of the atmosphere is zero. Where the ratio is 2, the lifetime is zero. Where the ratio is 3, the lifetime is a few weeks. Where the ratio is 4, thelifetimeof the atmosphere is several thousand years. Where the ratio is 5, the lifetime of the atmosphere is about a hundred million years. Where the ratio is 6, the lifetime of the atmosphere is infinite.
Of course your spaceship might not operate for geological periods of time, so a ratio of 3 or 4 might be sufficient tor the duration of the story.
Note that the ratio is the ratio of the escape velocity and not the surface gravity to the root-mean-square of the velocity of atmospheric particles.
The planet Earth has a surface gravity of 9.80665 meters per second per second,or 1 g, and an escape velocity of 11.186 kilometers per second.
The planet Jupiter has a surface gravity of 24.79 meters per second per second, 2.527 of Earth's, and an escape velocity of 59.5 kilometers per second, 5.319 of Earth's.
The moon Io has a surface gravity of 1.796 meters per second per second, 0.183 of Earth's, and an escape velocity of 2.558 kilometers per second, 0.228 of Earth's.
The moon Europa has a surface gravity of 1.314 meters per second per second, 0.134 of Earth's, and an escape velocity of 2.025 kilometers per second, 0.181 of Earth's.
The moon Ganymede has a surface gravity of 1.428 meters per second per second, 0.146 of Earth's, and an escape velocity of 2.741 kilometers per second, 0.245 of Earth's.
The moon Callisto has a surface gravity of 1.235 meters per second per second, 0.126 of Earth's, and an escape velocity of 2.440 kilometers per second, 0.218 of Earth's.
Compare the ratio of each object's surface gravity compared to Earth's, and the ratio of each object's escape velocity compared to Earth's. Those two ratios are not the same for any of those five objects.
The surface gravity and the escape velocity are two different things and there are different formulas to calculate them.
https://en.wikipedia.org/wiki/Surface_gravity
https://en.wikipedia.org/wiki/Escape_velocity
So to form an atmosphere outside the spaceship, it needs an artificial escape velocity generator instead of an artificial gravity generatior.
Fortunately, it seems reasonable that an artificial gravity generator would vastly increease the otherwise insignifcent escape veloity of the spaceship as a side effect.
If you calculate the mass that a spherical object with the radius of your spaceship would have to have to have asurfucae gravity of 1 g at its surface, you can assume that your super scientific gravity generation somehow simulates the effect of having that much mass at the center of your spherical spacehip.
And that amount of simulated mass should presumably be used to calculate the escape velocity at various distances from the center of your presumably spherical spaceship. And thus you should be able to calculate the escape velocity at the surface of your spaceship, and at twice the radius of your spaceship, and at four times the radius of your spaceship, and so on.
And the strength of the escape velocity created as a side effect of your generated gravity shoud quickly fall off with multiples of the radius of your presumably spherical spaceship. Unles it is a supergiant spaceship like the Death Star or the Skylark of Valeron.
So whenever some of the atmosphere gets more than a few meters or kilometers from the surface of your spaceship - depending on the size of the spaceship - it should be travelling several times as fast as the escape velocity of at that distance and should escape very rapidly.
I also note that the solar wind includes fast moving particles which strike the upper atmospheres of astronomical bodies and knock atmospheric particles away from the planets, gradually eroding their atmospheres. Having strong planetary magnetic fields deflectes those charge particles away from the atmosphere and protects it from that process.
So if your spaceship retains atmosphere for a long time, it should generate a strong magnetic field for some reason which also protects the atmosphere around the spaceship. Possibly the magnetic field would be used to deflect charged particles and keep them from penetrating the ship's hull and harming the crew.
Or the spaceship could always operate far enough from the nearest star that the solar wind would deplete the spacehip's outer atmsophere much more slowly than particles escape from it anyway, and so is not a major factor in atmospheric loss.
So how would such an atmopshere be produced. If the ship's hull leaks, theleaking atmosheric gases might be trapped inside the outer atmosphere by the generated gravity. It would be a badly designed spaceship which leaked air fast enough to form a breathable atmosphere outside it.
And I doubt if a spaceship advanced enough to have generated gravity would use rockets, except for very advanced a powerful rockets.
A powerful rocket would work one of two ways. It would either::
A) Expel a lot of particles at rather slow speeds. But those rather slow speeds might be several times as fast as the escape velocity resulting from the genrated gravity. I think that they would have to expel matter faster than the escape velocity in order to move the spaceship while the geneated gravity was turned on. Thus such rockets couldn't produce an outside atmosphere for the spaceship.
Or:
B) Expel a small amount of particles at very fast speed, like ion engines. Those particles would certainly be travelling many times the secape velocity and would certainly all escape. And such small amounts of particles would certainly not accumulate to make a noticeable atmosphere around the spaceship.
In the Star Trek episode "Obsession",15 December 1967:
SCOTT: Captain, while we're waiting I've taken the liberty of cleaning the radioactive disposal vent on number two impulse engine, but we'll be ready to leave orbit in under half an hour.
And:
KIRK: Scotty, try flushing the radioactive waste into the ventilation system. See what effect that has.
So possibly your ship produces radioactive wastes and vents them, producing a radioactive atmosphere.
The density of the interplanetary medium, to say nothing of the interstellar medium, is so incredibly, unimaginably thin that the spaceship would probably have to have its artificial gravity generator turned on for geological ages to gather an atmosphere.
Possibly your crew make a lot of EVAs (Extra Vehicular Activities) for various reasons, and release an airlock full of breathable atmopshere everytime someone goes in and out, and conservaton of the ship's atmosphere is not considered important because it has a lot of extra air stored for some reason.
Actually the levels of artifical gavity inside the hull would be lightest in the presumably spherical deck right inside the hull, and stronger and stronger closer toward the artificial gravity generator at the center. So there could be cargo holds near the center containing vast amounts of matter compressed by the intense artifical gravity inside. And possibly that compressed matter might be air for the Martian colonies or someplace and they have no fear of running out of air.
If it is a passenber liner EVAs in space suits might be a common activity for the passengers. So the ship might possibly form a breathable atmosphere around it, depending on a lot of factors.
And maybe after a long voyage with many EVAs the captain knows that there is a breathable atmosphere around the ship. And when the long voyage is almost over tensions result in the crew demanding that someone be executed. And the captain refuses, saying that the death penalty is forbidden and they will all be convicted of murder and go to prison for life, and the crew threaten to lynch the person anyway. So the captain agrees to execute the person by "spacing" out the airlock without a spacesuit.
And when the captain is alone on watch he sneaks out an airlock and brings the spaced person back inside the ship and hides them somewhere safe until the ship reaches its destination and the legal authorities can take control.