With Flygon in a deck, it's important to know when things happen.
When you attack, you have to resolve all effects of that attack, and all actions triggered by those effects, before your turn ends.
So, you attack, do the damage/effect, and return Gliscor to your hand.
You now have no Active Pokemon. So you have to replace that active immediately.
Before your turn ends.
Then, Ko's are checked for.
Finally, your turn ends.
Now, between turns, Flygon is there, so it's Body takes effect.