Commands are stopped when profiles are switched, as resources that command depends on may not be available in the profile(s) being switched to.
If your workflow uses multiple applications, keeping the commands in the same profile would likely be the more efficient configuration.
The "{ACTIVEWINDOWTITLE}" token can be used to have a command perform different tasks based on which window has focus.
Should that not be feasible, you'll need to pass along whichever values you want to keep between your profiles, E.G. using globally-scoped variables.
You could use the "Execute a command each time this profile is loaded" option to have a command executed when the profile being switched to has been loaded, so that can check those variables and execute followup commands if necessary.