prorated refund and upgrade of tier

Hi all, I'm encountering an issue with auto-renewable subscription upgrades in the App Store. Here's my setup: Context:

Plan A: Base Plan (yearly auto-renewable subscription)
Plan B: Pro Plan (monthly auto-renewable subscription) B is configured as an upgrade from A.

Issue:

When a user with an active Plan A subscription upgrades to Plan B, I correctly receive an App Store Server Notification v2 with DID_CHANGE_RENEWAL_PREF and UPGRADE subtype. According to Apple's documentation, a prorated refund is issued automatically in this scenario, and no separate REFUND event is sent, the refund information should be retrievable through the upgrade event itself.

Testing in Sandbox:

In my sandbox tests, Plan A has a 1-hour duration and Plan B has a 5-minute duration. After the user upgrades to Plan B, I immediately cancel the subscription to prevent auto-renewal. Expected vs. Actual Behavior: After the 5 minutes expire, Plan A still appears as the active current entitlement. I initially thought this might be because the prorated refund hadn't been processed yet. However, even after waiting the full hour (the original duration of Plan A), it continues to show as an active entitlement—which shouldn't be the case. As a result, when I attempt to restore purchases, Plan A is still identified as valid and the subscription gets reactivated.

Question:

Is this behavior expected in the sandbox environment, or am I missing something in how the prorated refund and entitlement expiration should be handled?

prorated refund and upgrade of tier
 
 
Q