What's the advantage of repurchase agreements over collateral backed loans?
Repo and Securities Lending
https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr529.pdf
Nominal page 2:

A repurchase agreement is the sale of securities coupled with an agreement to repurchase the securities, at a specified price, at a later date (see Duffie (1996) and Garbade (2006)). Securities lending agreements are economically similar to repo agreements.4 Both agreements resemble a collateralized loan, but their treatment under the U.S. bankruptcy law is more beneficial to cash lenders:    In the event of bankruptcy, cash lenders can typically sell their collateral, rather than be subject to an automatic stay as would be the case for a collateralized loan.

Two advantages are

Repo are short term self-liquidating positions which automatically run off the balance sheet under the terms of the deal; and

Collateral under Repo deals is available for sale by the lender if the counterparty goes bankrupt.