If it is obligatory for a muʿtakif to leave the place of iʿtikāf – for example, to pay a debt that is obligatory for him, and the time to repay it is due, and he has the ability to repay it, and the lender wants it to be repaid; or, to accomplish something else that is obligatory for him and which requires him to leave – then in these cases, if he acts contrary to his duty and does not leave, he commits a sin but his iʿtikāf does not become invalid.
Ruling 1756.* A muʿtakif must not stay outside the mosque for longer than is necessary; and while he is outside, if possible, he must not sit under a shade. However, if he cannot help sitting under a shade in order to attend to the matter in question, there is no problem. And based on obligatory precaution, after he has attended to the matter, he must not sit at all unless it is necessary for him to do so.