Wrong notification popup

Sometimes, when a new notification comes, the notification popup shows an old notification instead. I have to expand the list of notification to see the new notification. What is causing this?

Hard to say without basic information (GNOME version, distribution) and steps to reproduce (which application(s) are affected).

GNOME 36 on Ubuntu 20.04 and GNOME 45 on NixOS 23.11. I have been noticing this on other versions too, but I cannot remember exactly. It does not need specific steps to reproduce. It just happens. Right now I can reproduce it while every extension is turned off.