On all 2-stroke engines, some fresh fuel mixture is wasted ..pushed into the exhaust along with exhaust gases.. It's the nature of the beast.
But this fresh mix usually doesn't ignite in the pipe.. there's not enough oxygen for one reason. It'smixed with lots of inert, burned gases for another. And it needs some sort of igniter for another.
But if there's a leak in the exhaust system, that could supply the needed O2 .. Fresh air enters the pipe through the crack.
Combine that with late ignition timing, or an engine that needs general tuneup, and it could cause backfires.
It makes sense that it's more likely to happen at top RPM where everything in the engine is moving at maximum speed and exhaust is hotter than at any other time. I can picture long, hot flames erupting from the exhaust port at top rpm.
so, i'd check for and repair all cracks or leaks anywhere in the exhaust system and re-check and re-set ignition timing.