Welcome to Android Central.
It sounds like your app is sleeping. I know you said it happens when the phone is sleeping but actually if the apps are not generating notifications when the phone is sleeping or awake and the app is not opened it is most likely that the app is sleeping.
Open your settings menu. In the search bar type "sleep", in the results go to Sleeping Apps. I don't know Redmi phones well enough to give you the step by step way of getting there but as long as you can find it the steps should be the same regardless of brand or model. Look for your app in the list of apps that have been put to sleep and remove it from the list.
If you do not find WhatsApp in the Sleeping App list check the Deep Sleeping App's list and remove it from there.
To prevent the app from ending up on the list again look to see if you have a Never Sleeping App's list and add the app to that list.
Again I'm not familiar with Redmi but I am familiar with Samsung that has a bad habit of putting everything to sleep. There's a good chance that it happened automatically but there is also a chance that, like me, you received a little notification that said something was running in the background and asked if you would like to put that thing to sleep. Again like me you may have thought this a temporary thing or a just this time thing only to later find out that no, it meant that the app was going to be added to the sleeping apps list never to return.
Let us know what you find. To receive notifications when others reply to your thread and to leave comments of your own please take a minute to create an account. It will help you communicate and get help. This link will guide you through how to do that...
https://forums.androidcentral.com/ask-question/409154-join-android-central-community-new-post.html