Hi.
I have built an automation to set or clear a custom field (SAFe Team) depending on the Sprint field. Two teams are working towards a common backlog, and issues assigned to a sprint are either assigned to this first team's sprint or the other team's.
Every time the Sprint field changes, I want to make sure that the SAFe Team field matches the team that owns the sprint or clear the field if the Sprint field is cleared.
My current automation reports some errors from time to time that I do not fully understand. I hope someone here in the community can help.
This is the current automation;

This is an example of how the errors look like;

The IF block looks like this with the JQL part shown;

The format of the sprint names is "NPS <team-name>_<period-tag>". Examples are shown below;

The JQL validates in the automation editor and also works in filters, but I interpret the error message as if the automation detects some kind of problem with this JQL. The group user has the User role assigned in this Jira project.
What am I missing here?