Answer
String.includes() is an ES6 JavaScript feature that isn't supported by the workflow script task's JavaScript engine — use .indexOf() instead (checking for a result other than -1) to achieve the same substring-check behavior in a way the script task's engine actually supports.