In Canada, the bank loses the money. They are the party that is ultimately responsible for paying only the person the cheque ordered to be paid. Canadian law is actually very strict on this, the bank would would be liable even if the landlord fraudulently gave the cheque to his brother to cash.
The Supreme Court of Canada has made multiple decisions confirming the banks liability in cases like this, most recently in Teva Canada Ltd. v. TD Canada Trust:
... The question at the heart of this case is which innocent party — T or the collecting banks — should bear the loss resulting from fraud? The Bills of Exchange Act should be interpreted in such a way that drawers and banks are exposed to the risks created by the fraudulent use of the system, but the banks are the more significant beneficiaries of the bills of exchange system. It is therefore appropriate, in certain circumstances, for them to bear risks and losses associated with that system. To allocate losses to the drawer for having failed to identify and detect the fraud is inconsistent with the strict liability tort of conversion, which makes any negligence on the part of the drawer or the banks in preventing the fraud irrelevant. The Court has, in multiple decisions, provided a two‑step framework which outlines what a bank must prove to demonstrate that a payee is fictitious or non‑existing. ...
Note that tenant would still owe the landlord rent. If the bank paid someone other than landlord then cheque wasn't properly honoured and so no longer satisfies the debt. So in the end the landlord would get paid, the tenant would only pay for the rent once, and the only bank would lose. That is, assuming the bank couldn't recover the money from the person who fraudulently cashed the cheque.
(Note that banks in Canada make it very difficult for their customers to obtain compensation when the bank screws up, so what I've written above is only what should happen according to the law in theory. In practice the tenant will have to spend months going through the bank's arduous dispute resolution process, and only after that fails be able to go court to recover the money. Most tenants will give up before this and so will end up having to pay the rent twice.)