Same issue. If the PWA application is not minimized then I don't receive notifications.
Teams PWA - notifications for active chat not sent if window is not minimized
I use MS Teams as an installed PWA. Notifications work, but they are not sent/shown in some period after using the PWA. For example, I write a message, switch to another application, I get a reply within maybe 1 minute, but I don't get a notification. I guess the application thinks I'm still working with it, but in fact I'm missing messages. I experienced this in Linux/Chrome, Edge and also macOS/Edge. Notifications don't seem come also when I'm writing a message in Teams to a person and I get a message from someone else.
It would be good to have an option to "send notifications even when Teams window is active" or even better to improve the detection of the window being active.