I believe what you are observing is the “downgrade“ behavior, which don’t go into effect immediately. Subscriber keeps their existing plan and on their renewal date they are downgraded to the other plan. The opposite is the case for upgrades, where we do upgrade you immediately (charged, new period begins, and receive pro-rated refund for previous service unused). What plan changes are an upgrade or downgrade is determined by how you setup your products in your subscription group in App Store Connect..
Think of this scenario: If I’m on the monthly plan and want to move to annual, most devs and customers would want that to be instant (upgrade) as I could lock in the annual plan cost savings right away. So the dev must set the annual plan at a higher level than the monthly. With this setup, In the inverse, if move from annual to the monthly plan, that plan change goes into effect at the end of my annual plans period.
See this description of plan “rankings” and how the levels in App Store Connect determine this behavior: https://developer.apple.com/app-store/subscriptions/#ranking
and here for setup: https://help.apple.com/app-store-connect/#/dev75708c031