This comes up a fair bit.
If you repay a loan it is gone. You cannot resurrect it later and claim the interest.
4 solutions
1. Simulatneuous settlement
not always practical
2. termporarily borrow from family, trusts etc
3. Ask the lender to keep the loan open by having proceeds...