It is annoying, but there's a simple way to leave the town. You can either:
1) Walk to the edge of the map and leave manually.
2) Quicksave with F12, leave the game and then load your quicksave. You'll get attacked once again, so wait untill the morning.
1) Walk to the edge of the map and leave manually.
2) Quicksave with F12, leave the game and then load your quicksave. You'll get attacked once again, so wait untill the morning.