@De Bondt, Hannes (Mechelen) Glad that you were able to resolve your issue and I appreciate your effort in sharing the solution. Your contribution will undoubtedly assist others facing similar challenges.
As the Microsoft Q&A community follows a policy where the question author cannot accept their own answer
I've reposted your solution. Feel free to consider "Accepting" the answer if you find it suitable.
Problem: The issue is that deploying from the development branch via GitHub Actions works for the development environment, but for master branch error- Deployment Failed :( Deployment Failure Reason: Failed to deploy the Azure Functions.
Solution: "When deploying the static webapp a few months ago, before configuration was in Environment Variables, there was a FUNCTIONS_WORKER_RUNTIME = node. This was migrated to the environment variables. When removing this variable and moving it inside the staticwebapp.config.json, deployment worked as expected."
Thanks again.