Americans were asked what they would do if they were in the same position as Ukrainians are now: stay and fight or leave the country? A majority (55 percent) say they would stay and fight, while 38 percent say they would leave the country. Republicans say 68 – 25 percent and independents say 57 – 36 percent they would stay and fight, while Democrats say 52 – 40 percent they would leave the country.
I'm relatively certain the situations are not geographically analogous. Ukrainians can move to an supposedly safe adjacent NATO country by train or car or even in some cases on foot. If North America is invaded, does anyone believe either Canada or Mexico would be a safe haven? I don't.
I suspect a better question would be one that presumes there is no feasible way for most Americans to bug out, and instead asks would you resist the invaders or keep your head down and try to get along as best you can. I'd guess the results wouldn't be so very different from those above, revealing who would be the quislings.