In moving a body against gravity work is done against gravitational force of attraction.
It means in all three cases potential energy of the system increases.
But when the bubble rises in the direction of upthrust force then system works so the potential energy of the system decreases.