Whenever you buy or sell shares in a multiple-contract market, PredictIt credits or debits your account according to your change in risk. If selling certain shares causes your overall risk to increase, you will have to have sufficient funds to cover the additional risk.
You don’t actually “pay” for all your shares in multiple-contract markets. Indeed, it is often possible to acquire shares in several contracts in the same market and have funds credited to your account in the process. When you hold shares in contracts within the same market you are, in effect, hedging your position, ensuring that your losses in one contract will be offset by gains in the others. When you sell off your position in those parallel contracts – to pocket a gain on those shares, for example – you are exposing yourself to greater risk if your position in the remaining contract(s) doesn’t pan out. Since you didn’t “pay” for those shares in the first place, you have to do so at the time of the new transaction.