this raises some issues.
Did the company require you to sign a personal guarantee? Were you paid for this? The company has clearly benefitted from you giving a personal guarantee, so is this gain accounted for in the company books?
If the guarantee is personal then it seems there is nothing you can do, unless such a guarantee is illegal and should never have been accepted by the bank.
If the guarantee was made by you in your professional capacity, and you were acting as an officer of the company then when your role as an officer comes to an end then maybe the guarantee also comes to an end. This seems unlikely as it wouldn't really be described as a personal guarantee.
I think this situation is unusual, and I'm not sure how a court would view this. I think the company was wrong to ask employees to give personal guarantees, and the bank was wrong to accept it.
Or perhaps the bank weren't wrong, but it should have been made clear to you that the guarantee would outlive your employment.
The company must try to repay the loan I'd imagine.. they can hardly say 'well, we won't pay, as Mr X has given a personal guarantee so we'll let him pay instead'.