Ms. Sharon, can you provide us the date he signed this oath of allegience? Also, are you sure it was to the state of Virginia and not the United States?
I am just guessing here but if he deserted and did sign an oath of allegience to the United States there was no way he could have just went home to Virginia. There would have been a danger of reprisals from Confederate sympathisers. That may explain why he went to New Orleans for the rest of war. By early 1862 New Orleans was under Union occupation and he would have been safe there. He may have selected New Orleans because of friends or family living there.
As I stated, this is just a guess so take it with a grain of salt.