Going by the anime, Ditto having Ditto's face while Transformed seems to be a plot issue.
https://bulbapedia.bulbagarden.net/wiki/Ditto_(Pokémon)#Major_appearances
"Duplica has a Ditto that debuted in Ditto's Mysterious Mansion, where they used to perform for people, only to lack an audience since people saw that Ditto could not change its face. Ditto fixed that problem near the end of the episode, when it was captured by Team Rocket."
That Ditto had facial issues, & might be well-known/iconic for being a Ditto from the Kanto episodes, being 1 of the first Ditto introduced to audiences, & whom, along with its trainer, re-appeared later. So there might be creative bias towards its depiction.
"Sometime before Imitation Confrontation, Duplica found another Ditto, which she nicknamed Mini-Dit. This second Ditto could transform into an exact mirror image of anything, but it could not change its size."
"In Unfair Weather Friends, a Ditto was Brodie's partner-in-crime. It reappeared in the same role in The Ribbon Cup Caper."
"In Dealing With A Fierce Double Ditto Drama!, Narissa used two Ditto nicknamed Ditto 1 and Ditto 2. Ditto 2 is Shiny."
All of those Ditto matched the faces of what they Transformed into.
"In Deceiving Appearances!, five Ditto were getting vaccinated at Aether Paradise. One of them escaped but was soon rescued. One of them reappeared in a flashback in A Masked Warning!. All of them reappeared in Don't Ignore the Small Stufful!."
Part of the plot of Deceiving Appearances was using the facial features of the escapee Ditto persisting through Transformation to identify the escapee Ditto amongst the Aether Foundation. Although, I'm unsure if they clarified if it was unique to those Ditto.
"In The Power of Us, Margo befriended a Ditto. It and a Teddiursa were targeted by Pokémon hunters looking for Zeraora, but they were saved by Zeraora, Ash, and his friends."
There might be a gallery for that movie on Serebii or such.
"In A Talent for Imitation!, a Ditto works as a film actor because Transform is unusually efficient for impersonations. Its latest role was in a movie directed by Kublock, about Gardevoir twins, but it ran away due to Kublock's overly strict attitude and its increasing inability to use Transform as effectively. Ditto eventually ran into and befriended Team Rocket, who taught it how to overcome its nerves and regain its confidence. As a result, it returned to the set and production resumed without any further problems."
This Ditto is shown to wrongly have the Ditto face when Transformed due to the apparent stress from Kublock's overly strict attitude with it.
However, after Team Rocket helped it, it was able to resume doing problem-less impersonations:
https://www.filb.de/anime/ss/019/image/MTsS1GdB89tqSHQhhaKXizJb8dBKnA--
Drake's Ditto, seen in Hello, Pummelo!, did not have such issues.
https://www.filb.de/anime/pm/113
If y'all are wondering, Filb.de is a gallery site that Bulbapedia links to on all of their anime episode pages. It doesn't always get all the important moments, but it gets at least a few dozen per episode. Very useful for visually skimming episodes without watching them.
Also, Ditto has these entries:
Yellow | When it spots an enemy, its body transforms into an almost perfect copy of its opponent. |
---|
Scarlet | Its transformation ability is perfect. However, if made to laugh, it can’t maintain its disguise. |
---|
Emerald | A Ditto rearranges its cell structure to transform itself. However, if it tries to change based on its memory, it will get details wrong. |
---|
Sun | It can reorganize its cells to make itself into a duplicate of anything it sees. The quality of the duplicate depends on the individual. |
---|
Ultra Sun | While it can transform into anything, each Ditto apparently has its own strengths and weaknesses when it comes to transformations. |
---|
Ultra Moon | It transforms into whatever it sees. If the thing it's transforming into isn't right in front of it, Ditto relies on its memory—so sometimes it fails. |
---|
Sword | It can reconstitute its entire cellular structure to change into what it sees, but it returns to normal when it relaxes. |
---|
Yellow (& LG/PE) are the only ones with entries to call it "almost perfect", rather than saying it is perfect or not specificying if it's perfect or not, & in those cases, it could have been to reference the anime, as, IIRC, those games were trying to do that. Yellow having a Pikachu partner, LG/PE having Gym Leader appearances match the anime, etc. IDK if Duplica had appeared when Yellow was made, though.
Nonetheless, if the Pokedex is calling it "perfect" or "almost perfect", it'd be weird for it to have a glaring issue like getting the face wrong regularly.
& we do see in the anime what Sun & Ultra Sun's entries bring up: Individual Dittos seem to vary in quality, with different strengths & weaknesses.
& in the case of "almost perfect", we know there's other flaws, even if we ignore not copying HP or PP: Like Ditto de-transforming if it laughs or relaxes, or getting details wrong if it tries to change based on its memory.
Other than at least 1 of the Aether Foundation's escapee Ditto (& IDK if they're flawed like Duplica's or the actor Ditto.), the anime's Ditto seem to copy faces without issue, so I'd dare call that the Ditto having Ditto faces while transformed so Ash & co. can find & relocate them to the Aether Foundation's care seems like Plot-Induced Stupidity to me. (Said Ditto are also being vaccinated for something, but I don't remember what & I wouldn't be surprised if Pokemon under the care of the Aether Foundation have issues for 1 reason or another.)
Other than the AF's escapee Ditto faces, when a Ditto does have a Ditto face after Transforming, it's treated like an issue.
Sorry about all the words. Hopefully that helps, or is at least ineresting.