The Acerola's Mimikyu in Pokémon Sun and Moon: Ultra Adventures.
Ghost-type Pokémon in particular have a long history of unusual adaptations in the anime. An early episode featured a Gastly working with a human ghost wo could create all kinds of illusions, including a bizarre Venusaur/Blastoise fusion. Another from the Sinnoh era focused on a Mismagius that created an illusion of a Rayquaza, which it took control over to impressive effect. Some Ghost-types have been shown to be mostly harmless tricksters, while others like Litwick are incredibly dangerous creatures, literally feeding on the life force of people and Pokémon alike.
Acerola is a Trial Captain from the Sun and Moon games and uses Ghost-type Pokémon that fit with her haunted aesthetic. She's closely associated with Mimikyu, as it is the Totem Pokémon for her challenge. The anime decided to take things a step further by giving Acerola a very special Mimikyu, named Mimikins. Mimikins has the appearance of a shiny Mimikyu, which has a desaturated color palette, as well as a floral decoration pinned to its (decoy) head. Shinies in the anime are rare enough, but what really made Mimikins special is the fact that it's a ghost. Not just a Ghost-type, but literally the ghost of a deceased Mimikyu. Being dead means that Mimikins can't attack or participate in battle, but it's also no longer bound by gravity, allowing it to hover and fly around.
The Difference Between Ghost-Type Pokémon and Literal Ghosts
As mentioned above, human ghosts have been seen in the anime on several occasions--even Ash once "died" and had an out-of-body experience alongside Gengar and Haunter back in Kanto. The Red and Blue games famously feature the ghost of a dead Marowak, which is able to fight but can't be caught, so it's not entirely unprecedented, but Marowak wasn't a Ghost-type. The fact that a Ghost-type like Mimikyu can itself become a literal ghost raises a lot of questions about what it means to be a Ghost-type. Some are corporeal beings, like Mimikyu, and some possess an object, like Honedge, but others are incorporeal or made up of gas, like Gastly. Some Ghost-type Pokémon are even said to be born from the spirits of dead humans, like Yamask, adding yet another layer of confusion to the mix. It seems that the Ghost-type doesn't necessarily mean that a Pokémon is a literal spirit of some sort, but they do have some kind of relationship with the afterlife. Since many ghost-type Pokémon are said to have a connection to some kind of spirit realm, it's possible they're native to another plane of reality, and are just as mortal as any other Pokémon.
The Pokémon anime generally makes it clear that there's a lot they still don't understand about Pokémon, and it seems that goes double for Ghost-types, which are the second-rarest type there is. Drawing a line where a dead Pokémon can't battle is probably for the best, even if it's still allowed to hang around after death.