I'm not entirely sure of the exact trick, but the most reliable strategy against tough bosses in this game is to lean on the original characters—Sonic, Tails, Amy, and Knuckles—and use as many of them as you can. If you can't field enough of the originals, Omega or Shadow make strong substitutes.