Cut the rope and leave the bubble alone — do not pop it.
Let the rope catcher grab the candy while it is still inside the bubble, then pop it. The candy drifts into a second bubble; cut that one free and Om Nom eats, and you walk away with all three stars.