I think that this is a very good question.
In my answer I will only mention the formation of one of the absorption lines, the 589 nm of sodium, and I will call the photon associated with that wavelength a "sodium photon".
What I will try to explain with reference to that particular wavelength of light will be true for all the other wavelengths for which absorption occurs.
The schematic layout of a standard demonstration of absorption and emission lines is shown below.
At position $A$ one would see an absorption spectrum and at position $B$ an emission spectrum and the "re-radiated in all directions" explanation works very well.
The difference with the Sun is that the "sodium flame" envelopes the Sun and the rate of "sodium photons" emerging from the Sun is less than the rate of emergence of photons with comparable wavelengths.
I think that the OP is asking "Where do the re-radiated sodium photons go?"
The fact is that the rate at which sodium photons escape from the "sodium flame blanket" around the Sun (the Sun's outer layers) is smaller than the rate at which photons close in wavelength escape.
So in effect that outer layer of the Sun is fairly opaque to sodium photons.
As the sodium photons which are being produced in the internal layers of the Sun progress through the outer layers of the Sun they get absorbed and re-radiated so the net rate in the forward (away from the Sun) direction decreases and there is a flux of sodium photons heading back towards the Sun.
Here they interact with the hotter "inner" layers of the Sun and do not necessarily emerge again as sodium photons, their wavelength is changed.
They are thermalised (I cannot think of a better wording).
Those sodium photons enter regions within the Sun where they they are in excess of what might expect for the distribution of wavelength for the temperature of those inner layers.
Interactions within those layers reduce that excess number of sodium photons, so they cease to be sodium photons.
So the net effect is that the "sodium flame blanket" around the Sun sends back towards the Sun sodium photons which are then transformed into photons of other wavelengths.