Here's a messy answer, I hope you can make sense of it. There are two different meanings, depending on which of the two words you use together with the punctuation of the sentence.
"we are working on some bugs that affect around 2% of the iPhones shipped," specifically constrains the noun 'bugs'. In other words, we are working on only those specific bugs that are affecting 2% of the iPhones.
"we are working on some bugs, which affect around 2% of the iPhones shipped," has a different meaning; you can leave out the bit between the commas ("which affects around 2% of the iPhones shipped" and the sentence would still retain its meaning which is essentially, " we are working on some bugs and hope to have an update soon".
So, if there was a comma after 'bugs' then 'which' would have been correct because the clause that follows is non-restrictive to the noun. But as there is no comma, 'that' is correct as it is linking to something that is constraining or qualifying the noun ('bugs').
BUT you should take care - it's not quite as simple as all that! Browsing through various grammar-related websites, it is obvious that not everyone agrees, mainly because the meaning has apparently changed over time. The above appears to be the current interpretation, but there may not a definitive answer.