OK, so chances are that there are some subtle differences that you have not spotted.
Or there could be a bug in ZAP of course, so lets do some more testing.
When you create the initial Alert Filter use the "Test Filter" option - does it apply to any alerts?
If not then thats probably a bug in ZAP.
After rerunning the test look in Options / Global Alert Filters - is your Alert Filter present and enabled?
If not then its something you are doing wrong.
If it is there then open it and use the "Test Filter" option again - does it apply to the new alert?
If not try clearing the text fields one by one and testing the filter each time. Which one do you need to clear in order for it to work?
Cheers,
Simon