The upgrade/downgrade flow works fine. The problem occurs when the Sandbox user tries to buy the subscription again after it was upgraded/ downgraded to another one.
Success transaction received but with the old id and no subscription change effect.
By the way, it is possible to do it from Settings -> Sandbox account -> Manage. But it doesn't work from Storekit2 Product. purchase().
Extra call of Transaction.finish() or Clear Purchase History for sandbox user AppstoreConnect has no effect.