This is definitely something I've thought about before, and I can think of at least two possible explanations (at least, for the minor injuries).
1. Those Andalites probably
could morph those battle scars away, but they just . . . don't. It is made fairly clear that most Andalites, other than those specializing in espionage, don't really make much use of their morphing abilities. They do the training, maybe morph a
kafit for fun when they first get the ability, and then they just seem to forget that they have these powers at all. The Andalites in #18 didn't even have a small morph available to them so that they could escape the destruction of their ship. And, in any case, I could see an Andalite actively choosing
not to morph their scars away, with the scar being a point of pride and honor to Andalite sensibilities.
2. The morphing power probably takes some element of self-image into account. There's a couple books where it is made clear that a haircut will not be fixed by morphing (#2, #10, and #26, in case you wanted me to cite my sources), and neither will a piercing (#32). Both things are technically 'injuries' that do not affect DNA, but they stick around from morph to morph. And then I could go into all the stuff that's affected by environment rather than DNA, which is how identical twins can still look different from one another, etc. Yet, again, the morphing process keeps those environmental effects intact. So, what I think is happening, is that the morphing technology uses slightly more information than just the instructions in your DNA. It may also take into account your subconscious self-image. Which, for battle-scarred Andalites, includes their scars.
As for Elfangor, though . . . I think someone on RAF once pointed out that going into a morph is somewhat more difficult than demorphing back to your true form. So, while the Animorphs have often managed to demorph from serious injuries, they may have been aided by the fact that they were never (to the best of my recollection) fatally wounded in their true forms. Even then, they've had some very close calls. Elfangor says in TAC that he was 'too weak to morph,' and given the circumstances I'm inclined to believe that.
I had a fan-theory at one point, that Elfangor wasn't given back his morphing powers when the Ellimist freed him from his
nothlit human form. But the 'too weak to morph' comment seems to contradict that.