For anyone else coming here:
Using xcodebuild:
Add the key manageAppVersionAndBuildNumber as a bool with a value of 0 to your export options plist file (provided to xcodebuild with the -exportOptionsPlist argument.
Using Xcode GUI:
Uncheck the box that says 'Manage Version and Build Number'
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: