@pea
For Molly, this could be due to database lock. If the database is locked, you can't get notifications when you are using WebSockets for notifications. You can also use Molly with UnifiedPush (UP) or Firebase Cloud Messaging (FCM), and those normally allow you to receive notifications with a locked database and when your phone is in BFU (before first unlock) mode. That will be a general notification, telling you there is a new message in Molly, because the encryption can't give you contact or message content information. You can change the notification provider in the Molly settings. If you use FCM (which uses Google Play Services) or if you use UP (which uses a provider app like SunUp or ntfy), make sure to give Play Services and your UP provider app unrestricted battery.

For Deltachat, it also uses FCM: https://delta.chat/en/help#instant-delivery
So, make sure you have Play Services installed in the profile you are using Deltachat in and give Play Services unrestricted battery.

Delta Chat: FAQ

What is Delta Chat? Delta Chat is a reliable, decentralized and secure instant messaging app, available for mobile and desktop platforms. Instant creation of private chat profiles with secure and i...