The aircraft that taxis out is different from the one shown taking off.
After the Captain announces they are climbing thru 5000', they briefly cut away to the aircraft in flight. The plane has its landing gear down.
As Brett is approaching the airport to land, he lowers the landing gear and it is shown dropping from the wheel well. Shortly thereafter, the plane is shown in flight with the landing gear up.