Try using the (intmgr)GetActiveKey. If there isn't a key the output of the method will be null. If not null, compare the (intmgr)active key to your parameter you are passing to that automation. If they are the same, continue with your code. If not the same, you can activate the interaction(intmgr) and end any running activities if they are not needed from the old active interaction.
Wrap the activate interaction(intmgr) in an if statement. If it fails, close all unneeded interactions(loop) using Get Keys, then use StartInteraction with the Key you want to use.
This is a very safe way of controlling what key is active. Good practice would be to wrap the above into it's own automation and use it as a Method where you may ask if "Interaction Exists" passing your key and returning a bool. This is how I did it.