In the case of trademarks, a licensee should record the license in the trademark register, so that the world at large is deemed to have notice of the license. The license to use the registered trademark will then be binding on every successor in title to the grantor's interest, unless the license provides otherwise.
A licensee with sufficient bargaining power can request to contract with IP holding companies with little or no trading or business activities, so that liabilities are ring-fenced and there is consequently a lower risk of insolvency.
Otherwise, the licensee may seek to acquire the underlying IPR during the liquidation process.