America's invasion was stopped, but so was the British Empire's, and equally as bad.
America failed in getting Canada. The counter-invasion also failed, but that's secondary. America failed in its objects, so it lost the war (that's how I see it anyway, neither American nor British).