The short answer is yes they can. If the tenancy is for a fixed term and the tenant wishes to leave before the end of the fixed term, unless this is agreed by the landlord, the tenant would be liable to pay the rent for the remainder of the term. failure to do so would amount to a breach of contract.
I hope this answers your question. If so, kindly rate the answer and provide feedback.
If you have any further questions, please do not hesitate to ask.