Attack Perish Dream / Jirachi Prism (Celestial Storm 97)

Hello, I have a small problem with fully understanding the ability of Jirachi Prism from attack Perish Dream that says "This Pokémon is now Asleep. At the end of your opponent's next turn, the Defending Pokémon will be Knocked Out." .
I can't find rulings about this attack and only found topics about Wish Upon a Star ability.
I know what normally happens if I use this attack and defending pokemon will stay as active but, I dont really understand what happens in scenario like retreat or defeating active pokemon after using Perish Dream by damage.

Lets say this scenario:
I have Jirachi Prism as active pokemon and enemy have pokemon A as Active pokemon and pokemon B on bench.
I use Perish Dream on my turn. During enemy turn my opponent retreats pokemon A to switch with pokemon B.
What happens on end of enemy turn? Does pokemon A on bench dies from Perish Dream or does pokemon B dies or does nothing happens?
What happens if enemy bounces pokemon A to their hand?
What happens if using Perish Dream knocks out pokemon A from 10 damage? Does pokemon B as new active pokemon knocks out at end of turn or does nothing happens at the end of enemy turn?
Also, does Perish Dream stops working if enemy will knock out Jirachi during his/her turn? (I suppose efect still works but any informations will be good.)

Yes, if we have a ruling about a very similar scenario, we usually don't publish another ruling because then the Compendium would be unimaginably huge.

In general, when an Effect is placed onto a Pokemon, removing that Pokemon from the Active position will also remove the effect.
This can be done by moving the Pokemon to the Bench, evolving it, or removing it from play.

So in your example where A goes to the bench and B is now active, Perish Dream's effect is gone and does nothing.
If A was knocked out, the new active doesn't get the effect. It wasn't the Defending Pokemon when the effect was placed.

It doesn't matter what happens to Jirachi.
The effect is on Pokemon A, not on Jirachi.