Disable the "New Window" behaviour on dock icon

Hi,

I use brave in epichrome, it makes a “web app” out of a website without any UI. That works very well, but since version 1.27.108 there is a behaviour in Brave that when you click the dock icon it opens a new window instead of switching to the already opened window on a desktop. This is really annoying because it happens many times a day.

Is there a way, a hack, a workaround to stop this behaviour?
Do I have to recompile the MacOS kernel? I would do it right now, but please stop this! :grinning_face_with_smiling_eyes: