The Messenger of Allah ﷺ established the prayer during travel as two rakahs, and that is complete, and the witr prayer during travel is a sunnah.
حدثنا محمد بن جعفر حدثنا شعبة عن جابر قال سمعت الشعبي يحدث
سن رسول الله ﷺ الصلاة في السفر ركعتين وهي تمام والوتر في السفر سنة
Its isnad is daif, due to the weakness of Jabir Jafi. It appears in Majma al-Zawaid 2:155, where he said, Bazzar narrated it, and it contains Jabir Jafi, whom Shubah and Thawri considered reliable, while others deemed him daif, but he forgot to attribute it to the Musnad. See also 2124.