What does your lease say? Typical contracts in Qatar state that vacating the property prior to the conclusion of the lease agreement forfeits your post dated checks. It would seem the judge agrees since he rejected your request to have the checks returned.

You could try having a zero balance in your account. But then you'll just get arrested for writing bad checks, and possibly jailed or deported.

You signed a contract for 2 years. Your best option is to find someone to take over the apartment and they can pay you the rent each month.