They will almost always allow you to sublease though, which is its own horrible time sink to find a replacement tenant.
it's for sure a good option if you want a very short term thing, but it's a tough spot when you probably want > 1 year but 5 is a stretch.