Hi, first off, great game. 


Second, I was in a war, after the war, my units which were deep in the enemy territory could not leave. 


All the units that were near friendly borders could exit, but the one cluster of units that was in enemy territory could not. This was because any move they made would be deemed trespassing, and because the war ended, I had no war support to just declare another war to ignore the trespassing penalty. Clicking to go home also didn't work. They were also taking trespass damage the whole time. 


I'll give an irl example to show how the situation happened in game, imagine South Africa and Lesotho were one country. You're at war with South Africa, and you manage to get troops all the way to Lesotho. The war with South Africa ends. The troops that were in Lesotho now can't escape because they are surrounded by enemy territory. That's what happened in game. 


A suggestion I'd recommend would be to give units an "Exiled/Rebasing" trait after a war that would let them trespass as long as they are headed home.