The liquidity doesn't disappear if you swap it, it just moves from local/outbound to remote/inbound. Like, you open a 1m sats channel and have 1m sats to spend and 0 sats to receive, you swap those 1m sats to pay off your loan and then have 1m sats to receive and 0 to spend. Doable, but just buying a channel with inbound liquidity might probably be cheaper than tx-fees + ln-fees + swap-fees + loan-fees.