The raisins begin by sinking since their density is higher than that of soda water. As the raisins descend, they dissolve into water and carbon dioxide. This produces gas bubbles that adhere to the surface of the raisins, resulting in increased buoyancy. The raisins therefore rise back to the surface due to the net upward buoyant force.
Carbon dioxide bubbles on the surface of the raisins eventually burst and escape, causing a decrease in buoyancy and allowing the raisins to sink again. The cycle of sinking, gas bubble formation, and rising repeats several times until all dissolved air pockets have been released and the raisins completely sink to the bottom of the container.