As I was writing this question the answer dawned on me, so I'll answer it in case someone else is struggling with the same issue:
I was calling an AI Action to swap colors in a script. Problem was, if the "FILL" was not active the action failed. Then it dawned on me "Attribute Focus" might be added to the action. It worked: Set the "Fill" to active by recording a "click" on the Fill Swatch Icon:

