Your collateral is locked onchain (PDA) for the full duration of the loan. Neither you nor the lender can access it until the loan is repaid or the collateral is claimed by the lender after maturity (if the borrower doesn't repay).