I get Streamdeck profiles to change when a plugin window is opened but when I use more than around 10 macros (one for each plugin) nothing is switching anymore.
It looks like you are triggering all those macros on any Nuendo window change -- if so you may be running into a concurrency limit, stumbling into Nuendo reactivation issues, or even having the first-to-complete macro execute its "Cancel all Macros" action before the one you want to run gets a chance.
You don't need a macro for each. Make just one and in that have a "Switch/Case" action. Showing only a couple of options for brevity:
Going this route you will need to name your macros exactly the same as the window name it should match with. I don't use Nuendo -- perhaps it prefixes the window name with "Plugin" or includes some other text? So check the title of your window carefully...