Let me ask you this: the button is working so the problem that started this report is gone. It was due to the fact that I included echo statements in the filter function.
Although I think that is weird still the button functions properly now (that the result is not what I expected is something else — and there is a different report for that).
So what is left are those notices in the log. You will not see those by just visiting a live site. Did I mention I am on PHP 7.4?
Maybe also important that I am using the filter function. I guess not a lot of users are already using that? You have it active on your site?
I can open up the test site for a planned moment then you can access it but still what do you want to analyze? If you want this please make a suggestion for a date and time (I am on Amsterdam time) and please tell me how I can give you the proper url (as I do not want to post it here)