It seems to me this only happens if you don't use the app much. Or maybe some apps are "allowlisted", I've never had delayed WhatsApp/Slack notifications.
Not GP, but most of the apps I use that works without Google Play Services (specifically, FCM) have this problem too. Vendor-agnostic notification on Android, and as far as I know iOS, is still painful.
Ofc Slack and WhatsApp works fine : they use the Google notification system.
There should be a category: "Background Check" in the Android developer options. You can pretty finely tune or alter the automatically set priorities and permissions for background activity there.
I don't know exactly what the option is called but since Android 8 there is at least a toggle there per app. Later versions have lots more settings.
I use signal a lot (probably has 30-60 minutes screen time per day), and still notifications are extremely finicky no matter what battery optimization settings I tweak. So I'm leaning towards some apps being blessed
loading story #48924711
I use twitch almost every day, its notifications are usually off by 10-15 minutes... /shrug