In #4208 I removed the "autobuild" step and replaced it with "build-mode: autobuild" as mentioned in the docs but it failed with a different error ("could not compile"). So I reverted the changes again.
I also checked the version of the CodeQL action but the last successful build was using the same version as the failing builds.
Finally it got green after I replace "autobuild" with "manual" and added steps for running a simple Meson build.
While this is nice, I still have no clue why it doesn't work anymore with "autobuild" :(.