That the house voted on a Bill not a motion, such as the meaningful vote that was voted down, makes a huge difference. It can be amended and the HoC may suggest staying in the a customs union, a Confirmatory vote or whatever. It can still be rejected.
If the Withdrawal Agreement Bill is amended in a way that risks being interpreted as a failure to honour the commitments in the Withdrawal Agreement, then that will constitute a rejection of the Withdrawal Agreement.
After this Committee Stage it goes to the Report Stage where the government may decide to offer amendments that haven't got through the committee stage in order to get it through the Third Reading. The House decides, at this point, whether to accept or reject the amended Bill. The ERG could reject it if it has gone too far from the original for them, for instance. Or the collective opposition could, for example, if it doesn't contain a Confirmatory Referendum.
It then goes to the Lords and Ping Pong. The Lords are certain to amend it. They would be looking at it with regard to the Constitution. Even if a Confirmatory Referendum is not agreed in the Commons it could be included by the Lord's and sent back for a vote.
So all is not lost yet absthame*.