This will happen if the suji/semolina is not roasted well. Use medium-thickness semolina and roast it well before making the batter to avoid sticky idlis.