When you sell an option you act as a writer of the option and therefore receive a premium in your fund balance. If you close the position the funds get readjusted against the premium received, and thus you may see funds being deducted if the profit from the position is less than the premium received.
For example, if you sold one lot of Nifty futures and received a premium of ₹10,000 against it in your Funds tab then closed the position at say ₹5,000 profit then accordingly your funds will be adjusted. Hence ₹5,000 will be debited from your account instead of getting credited.