OK, right… Audacity is NOT the best for metadata… I doesn’t seem to be a priority of the Audacity developers. Audacity still doesn’t support embedded artwork.
It’s “difficult” because different the formats use different tagging standards (MP3 uses ID3 tags, FLAC uses Vorbis Comments, etc.). And ReplyGain tags are not part of the ID3 standard. It’s an additional tag. (Song ratings are also non-standardized.)
With Audacity, you can’t edit the metadata without creating a whole new file or completely overwriting the old one. With lossy formats (like MP3) that means an additional generation of lossy compression and some “damage” accumulates. You may not hear any quality loss and you may not have a choice, but it’s something to be aware of and you should try to avoid it and compress once if possible. Otherwise, try to minimize the number of times it’s re-compressed.
Mp3Tag can copy the tags from your old file to the new file. And you can set-up a batch process. (I’ve never done that.) ReplayGain shows-up as “Extended Tags”. mp3Tag is only updating the tags. It doesn’t “touch” the audio data. (It works on all of the common audio formats, not just MP3.)
Which also means if you have MP3s you are going through another lossy compression cycle.
mp3DirectCut can do limited editing without de-compressing/re-compressing. It’s a little “odd” to use and I haven’t used it that much but it should retain the tags.
FYI - MP3Gain doesn’t use ReplayGain tags. It changes something in the frame headers that sets the volume so it “works everywhere” and doesn’t depend on the player supporting ReplayGain. It also doesn’t go through a decompression/re-compression cycle. There is a limitation that the volume can only changed this way in 1.5dB steps, which means your tracks are usually within 0.75dB of each other, but not as precise as the real ReplayGain.
You can use them both together but you have to run MP3Gain first, and then ReplayGain is based on that new loudness. If you do it the other way around, MP3Gain will ignore the ReplayGain tag and the tag will be wrong for the new-modified file.
If you edit an MP3Gain’d file in Audacity, the new exported file will have the same loudness but without the modified headers, so from that point on it’s not reversable.
…I don’t think ReplayGain is an APE tag, but maybe so.