Few times it happens, that when I try to use it in Brave, it doesn't work. In such a case the solution is, that I jump to Gmail in Chrome and I use the macro there as well. After this, it starts working in Brave as well.
Thank you Michael, this is what I was missing! (This was kinda my gut feeling as well, that the ChromeURL variable was loaded by the right value in Chrome, this is why later it was working in Brave as well.)