I'm on Pie and have the same issue, and for me it's not just the mail app. I've had delayed notifications from texts and at least one other miscellaneous application as well. I figured it was due to the battery optimization setting, but I have it disabled.
It's pretty annoying, and I'm...