"The Defending Pokémon" is a key term in the Pokémon TCG that specifically means the Pokémon that is directly affected by the attack. The term is able to make this distinction because that specific Pokémon and only that specific Pokémon is the one who "defend[ed]" against the attack. The term is also useful because it can refer to the opponent's active Pokémon without using the word "opponent," making it clear that the effects of the attack are borne by the Pokémon alone and not the opponent. If the effect of Trevenant & Dusknoir-GX's GX attack made it so that any Pokémon in the opponent's Active slot would be Knockout Out, then, since all effects are removed from a Pokémon when it switches out, the effect would have to apply to the opponent. The use of the different key term "The Opponent's Active Pokémon" makes this distinction, putting any effects on the opponent so that they will apply to any Active Pokémon.[P][C]+ Pale Moon GX: At the end of your opponent’s next turn, the Defending Pokemon will be Knocked Out
This reads like it means no matter if they switch. "will be knocked out" means "it doesn't matter whether this attack affected the current active Pokemon". Because if it only affects the pokemon in the active at the time of the attack it would read:
[P][C]+ Pale Moon GX: The Defending Pokemon that this attack affected is Knocked Out at the end of your opponent’s next turn.
To avoid confusion they really should've said:
[P][C]+ Pale Moon GX: At the end of your opponent’s next turn, the opponents Active Pokemon will be Knocked Out