I run my phone on medium power saving and I have seen sometimes gmail gives me instant notifications and sometimes it takes hours
I feel there is a lot of AI running on these phones which has it's own mind and that's making all the decisions on when to send notifications for example or when to put your app to sleep etc
I was having the same issue with my S10 with gmail not sending notifications. I found if you go to settings > search for "special access" > optimize battery usage > turn of the gmail app, I started getting notifications again even while on medium power saving mode. I'm not sure if you've tried this yet but it seems to be working again normally for me? Hope this helps.
This actually seems to be helping. I am getting notifications now without having to pickup my phone and see if one came in. I think Samsung overcooked the power saving software and in their zeal to improve battery life they've created a lot of unintended bad things. So far I have to say battery life is better - I'm not sure if this is because it's a new phone or if they're doing a better job of power management - this notification issue notwithstanding. Now battery life is almost as good as my wife's 2-year old iPhone;-[ - the only thing about her phone I like better than my Galaxy.
I found if you go to settings > search for "special access" > optimize battery usage > turn of the gmail app, I started getting notifications again even while on medium power saving mode.
As soon as I did this, I got several notifications from gmail.... fingers crossed it continues working. Thanks for posting this @DumasZack !!