Update: I managed to fix it by manually calling:
/Applications/Xcode-26.0.0-Beta.4.app/Contents/Developer/usr/bin/actool --version --output-format xml1
In a step before the actual xcodebuild step. It's almost like it caches some kind of state that allows future calls into it to succeed.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: