I've beaten the game a couple of days ago. I'll go on and talk about the end. So at a moment you beat Infinite for the last time and he disappears. But the phantom ruby's power is still strong enough to power up a giant Death Egg Robot controlled by Eggman. The boss has 3 phases:
Phase 1: You play as Classic Sonic. The Robot destroys the platforms you're standing on with rocks. You have to throw them back at him (much like the first Eggman battle in the game.)
Phase 2: You control your OC. The Robot will be hitting the ground, spawning normal death egg robots, and destroying some pieces of the ground. You need to target his arm while he hits the ground (because he lets it cool down for like 5 seconds). You can also target his belly to remove more damage.
Final phase: Just when you think you defeated him, a white spider-like Robot (that's also giant) comes out of the death egg robot and takes all three playable characters to some sort of space realm. You fight it with them. All you need to do is that you'll see the boost things, and charge into the robot. What makes it hard is the amount of HP of the robot. But it's just like Infinite and Metal Sonic's battle.
So in the end, all things created by Infinite disappear. But even Classic Sonic disappears. He also says bye. And then you get the credits. After them, you'll get a scene with the main characters talking about what to do. Your OC goes back to Ghost Town. You also get to create new OCs.
For more information, check out these videos: