The New Saints failed to progress to the third qualifying round of the UEFA Champions League as Legia Warsaw closed out a 4-1 aggregate win in Poland.