Yes, selection should happen after the fact. Build at least an MVP with all critical functionality implemented in working stages.
Then use that for the competition to get the contract.
Preselection is hot garbage, as proven time and time again. Of course mechanism to mitigate the upfront cost of participating in such a competition should be implemented but in the end it should turn out cheaper/more worthwhile since a working MVP already exists by time of selection.