Don't know if anyone has mentioned this already, but here's my theory about the events in this chapter:
I don't believe it was an hallucination of Big Mom, neither a mass memory tampering done by Pudding. The destruction of the ship really happened.
However, I don't think that ship was the Sunny at all. In my opinion, what really happened was that Big Mom went into a transe after eating the cake (just like it happened when she was young) and completely lost awareness of everything around her. Just like before, she could no longer distinguish friend from foe - or in that case, friend from food.
I'm pretty sure when she's in this state, homies made out of her own soul also get affected - they seem to be somewhat in sync, hence why the ship is singing along with her when they're nowhere near each other. And that is why whenever she sings "risky", the ship fires. Just like Big Mom herself, the ship must also be completely unaware of its surroundings, so it is most likely just firing randomly at whichever ships are in sight. The ship that got obliterated must have been one of Big Mom's ships, just like the one that blew up when she first sang "risky".
The only thing this theory doesn't explain is the burned Straw Hat flag, but that could easily be explained by the fact that the ship got hit by the aftershock of one of the explosions and it fell off, or it could even be a flag that was being carried by the Sun Pirates, which got burned by Oven.