It sounds to me like your derailleur hanger may be misaligned. Next to flats, straightening bent der. hangers was my most frequent task at the shop.
http://www.parktool.com/blog/repair-help/rear-derailleur-hanger-alignment
Steel frames with quality, forged hangers built into the rear dropout are pretty sturdy, but cheap department store bikes have thin sheet metal hangers that come crooked from the store. And modern aluminum and carbon bikes have soft aluminum hangers designed to bend. The idea is to save the expensive derailleur and frame in a crash. But it means, if you lay your bike on the right side, or somebody kicks the rear-end, your bike will shift as you describe. The hanger can often be straightened once or twice, but it will fatigue and break off eventually.
I have seen $6K boutique bikes, where the hanger broke, and threw the $250 derailleur into the $500 wheel, with disastrous results!
That said, I am constantly amazed at the garbage bikes on this site. There are some amazing builds, with world class components. But many are pure garbage big-box bikes. I get that many are only interested in hot rodding electric motors, and the bike is an afterthought. And with hub motors the drivetrain can be completely inoperable. But with a mid-drive, you really do need to have a decent bike and drivetrain.
There is absolutely nothing wrong with the Townie frame, but the derailleurs, chain and freewheel will see more use in a week than the maker expects that bike to see in a lifetime.