answer is simple
Ask your company for a NOC (no objection letter). If they give you one you can come back when you want and get another job. If they say no, then sorry but you are not allowed to work in Qatar for the next 2 years.
Good luck