Judging by your screenshots, your exclude value lays under a multi-level structure source.
The filter expression does not have any knowledge about nested values. Therefore you will need to provide its value at an earlier stage or to be more precise: during the import logic.
You can do that by defining a modifier at the import source.
Here’s an example for your use case (the modifier method is a required property; just use trim, lowercase or substring in this scenario as you are not interested in actually changing the input string itself):
After doing so, you can just refresh and retrigger the import source and then refer to the newly defined platform variable in your sync rule configuration: