I know, I tried it and it didn't work for me. I tried to add a condition that apply only if the exe is bg3 or the title is the title of the window, and so on. I tried many things and nothing worked. I don't know why. AutoHotkey contains an app - spy and it says exactly the title or right exe of the game when it is running. So I was sure I put the right title or exe. Maybe windows itself blocks it for me somehow.
If you copy the code to google bard or bing chat and ask to make it run only of the exe is aaa or title bbb, it will write it for you. But it doesn't work for me. Try it on your computer, maybe it will work for you.