I'm playing Marshadow toolbox online with jirachi promo in the discard (the one with the stardust attack) -- opponent has splash energy on their frogadier.
Using the Jirachi Promo's stardust attack (text: "Discard a Special Energy attached to your opponent's Active Pokémon. If you do, prevent all effects of attacks, including damage, done to this Pokémon during your opponent's next turn.") I remove the splash energy on the frogadier.
Next turn, opponent upgrades their frogadier and plays Greninja's shadow stitching attack (text: "Until the end of your opponent's next turn, each Pokémon your opponent has in play, in his or her hand, and in his or her discard pile has no Abilities. (This includes cards that come into play on that turn.").
My reading of the text (and the entire reason I used jirachi's stardust attach rather than knocking out the frogadier) was that my Marshadow would keep its abilities after shadow stitching (similar to how Magearna-EX can protect against losing abilities from shadow stitching). But my marshadow still lost its ability.