Here is the experience of one Benjamin Franklin Smith of New Haven KY, 28th Regiment, Kentucky Infantry (I think). A few months after his enlistment he was captured and paroled. He was supposed to stay at Camp Chase in Ohio until he could rejoin his unit but he decided to go home instead. When he did rejoin the regiment, some months later, he was able to obtain an order from General George Thomas basically forgiving him for being listed as a deserter. The follow year he got sick, but rather than stay in the hospital (in Louisville, KY?) to recover, he went home again and was gone for an even longer time. He was accepted back into the regiment a second time when he returned, but this time his absence was not expunged from his record. He stayed with the regiment until it disbanded in 1865.
I'm still trying to figure out if I'm related to this man, but I find his story interesting. Why he wasn't shot is a mystery to me. But this doesn't make me think the Union army was very hard on deserters. Smith did keep returning so maybe that counted as something. Bounty jumpers were more of an issue perhaps? Or maybe it depended on the officers and how well they knew the men, etc.