It is the same model, same cockpit set, and same full sized prop. We can assume that in the year between TESB and ROTJ that someone went back to Bespin to get it. The new official canon is that Lando and Luke went back after they found out Han was delivered to Jabba. Luke looked for his saber, but retrieved his X-wing.
Alternatively it would be pretty easy to have a different X-wing painted to match the original.