Insolvency in such case scenarios is practically another word for a failed calculation, or the "secret" behind miraculously attractive prices in the gas, water, and electricity provider sector :-(
On the one hand, I have debts, on the other hand, a credit balance. Mind you, both with the same business partner. Why I am not allowed to offset both against each other, no one can logically explain to me, and now please don’t come at me with insolvency law...
But yes, exactly "insolvency law instead of logic" is the reason: the failure to offset is only illogical if the euro of debt and the euro of credit have the same value. However, this would only apply in the – unfortunately, to put it mildly, atypical – case of a 100% satisfaction rate.
Only then would the "exchange rate" between debts and credits be 1:1.
Your insolvency law misconception is: it is
not the same business partner. Rather, you have the credit balance with the insolvent company, while the debts are with its estate, i.e., the entirety of its creditors.