This is standard for Android and later versions. Gmail notifications are not considered high priority by Google, so when your device goes into doze mode (a few minutes after the screen goes off), notifications will only ping through during maintenance windows, where all apps are given a few...