You can sell your shareholding in a company at any time.
The sale price is based on the Share Price of the subsidiary at the end of the period in which you choose to sell.
The financial decisions you make for your subsidiary during the sale period will be ignored.
Any loans outstanding when you sell your subsidiary will be written off as a bad debt (debt to bank is unaffected)
If you are unable or unwilling to continue to lend to a struggling subsidiary then you should cut your losses and sell your shareholding.