I am getting the message "The subscription will not auto-renew" while purchasing the subscription. And after the purchase has been completed the subscription is not auto renewing. Everything is properly set up and I am using the sandbox environment currently for testing the in-app purchase. Does anyone know about this issue?
From your profile, I see you are from India.
A few months ago, Google has announced that it would pause new signups of auto-renewing subscriptions for users in India:
Subscriptions will continue to be available as single access passes that provide users a single billing period of access (eg. 1-month access). At the end of the billing duration, Google says users will need to sign up again in order to continue their subscription.
source: https://www.xda-developers.com/google-play-suspend-free-trials-auto-renewing-subscriptions/
So I think it's normal and you should test on another country if you want your auto-renewable subscription to actually renew ^^