Hi Patrick,
I am not sure that it is you. I did not realize it but suspect the compatibility of that code snippets to support FilterCodes in the custom menu may have ended with Moodle 3.8. I will need to take a look at it and see what is going on as I will be needing that functionality myself for a project upgrade within about a month or so.
If you want to be kept up to date regarding this issue, please open an issue ticket at https://github.com/michael-milette/moodle-filter_filtercodes/issues
Best regards,
Michael