Lee, like many other US officers, was faced with a conflict of loyalties. Nation vs. state. IMO honorable men could choose either one.
Lee chose to follow his state. Other Virginians chose to stand with their nation, including Thomas, one of the best Union generals.
It is my understanding that northern people have accepted that Lee and men like him made an honorable decision more readily than southerners have recognized the same for Thomas and his ilk.
You can find a listing of Union generals here.
By my count, of some 550 Union generals, roughly 20% were Southern-born.
Of those, about 1/3 came from Kentucky, followed (in descending order) by Virginia, Maryland, Washington DC, Tennessee, Alabama, and the Carolinas.
Even Georgia, Florida & Delaware each contributed one or two Union generals.
I could find no record of Union generals born in Mississippi, Louisiana or Texas.
Nor have seen reports of a Confederate general (out of 400 appointed) born outside the Confederacy.
Of Union generals, perhaps 10% were born in other countries, especially Prussia.
George Meade, the victor at Gettysburg, was interestingly born in Cadiz, Spain, son of a Philadelphia merchant naval agent for the US government.
After his father's death in 1828, Meade's family returned and lived in the South, where he also spent most of his civilian and military careers.