I am using M31, model number SM-M315F/DS with Andoird 10 update released by Samsung on 7-Mar-2020.
WhatsApp on this device goes completely inactive some time after the screen is turned off. If I unlock the phone and run WhatsApp again only then I receive my latest messages (so don't confuse this with notifications issue). Phone screen off -> WhatsApp off!
I have allowed the app to use data in foreground, background and also in data saver mode. I am not sure what I am missing.