Workflow doesn’t use the same engine as the Designer. The Includes method is part of ECMASCRIPT 6 and is therefore not yet implemented in all JS engines.
In a Workflow script, you can add the method yourself to the String prototype by adding the following line at the top of your script:
I just corrected the typo in the code above so you can now copy and paste it.
However, please note that this workaround is no longer required as the includes() method is now natively available when you select the Enhanced JScript option as your scripting language. You can set that language (and you should!) as the default one in Preferences | Behavior | Default Configuration.
Your version is old, you should really consider updating to the current version.
As for the Enhanced JScript language option, it was introduced in the 2019.2 release.
So until you update to a more recent version, you’ll have to use the corrected polyfill above.