I saw that Bitrise always was checking out a detached head. So I changed the workflow to checkout develop, because I do versionnumber update in a file and commit it.
Now when a PR is merged, it still does this detached head. But when I do a start build manually, it runs as expected.
I removed the trigger and re-added it, but still the same issue