Internal state dynamically gates task-specific attractor dynamics in prefrontal cortex