The CodeQL workflow does not use any custom settings and could be simplified by switching to the CodeQL default setup.
If there is no reason to have a custom configuration switch to the CodeQL default setup.
- GitHub Docs: Configuring Default Setup for a repository.