Was the company related? the type of job? Think yourself, would it look weird to you, if someone gives up a perfectly good company and visa, but wants to stay in the same country with a visa that is technically worse, but working online?
Check your travel insurance, they probably don’t cover you under conditions like long term stays, one way stays, or even flights not originating or returning to your home country.
Im quite confident that the Iraqi passport made it significantly harder, but very interesting to hear the experiences from other people around the world.