It works when it wants and doesn’t when it does not. I mean…
WhatsApp Web on Safari doesn’t sync with your phone in real time. So you get the notifications [only the red badge in my case, not as banner in the notification centre] when Safari syncs. If you open your WhatsApp web often, chances are you will have to wait a few seconds before the new messages are synced. Plus, all read messages on the phone remain unread on WhatsApp Web until you open each chat/message. In short, it’s annoying.
And by the way, you need to save/bookmark WhatsApp Web. In my case, I installed it as a web-wrapped app using Siri Shortcut, so it feels like a native app to some degree.
Maybe WhatsApp has to fully support this notification functionality to make this work properly.