Raspberry Pi is actively preventing enthusiasts from upgrading soldered memory to a larger configuration even when the replacement chip is technically compatible. The company says the restriction is intended to discourage unofficial high-capacity resales.
There’s a bit of a difference in that your iPhone is (used to be) more likely to be swiped for parts (since the whole phone is unuseable, but the screen e.g is still worth a couple hundred) than anyone is to sell counterfeit raspberry pis for profit - and if anyone did do that, why’s that even a problem? I know someone who successfully upgraded a Macbook Air to 8 GB back when they had the 4 GB option and that was also soldered RAM. All for his personal use, but the thing continued working and it’s trivial to implement a check for original config by serial number.