Parents help to buy house in cash

I’m looking to buy a house, and the market near me is hyper competitive. My parents offered to loan me the full cost of a house so that I can make a cash offer, then I would have 5 years to pay them back by obtaining more conventional financing. I’m struggling to figure out how to structure the arrangement. Ideally, I would pay then the same amount I’d be paying on a regular mortgage for five years, then take out a mortgage or “refinance” to pay the remaining balance.

If they just gave me the cash, that would likely be a huge taxable gift. If they structure it as a loan, that makes sense but I’m not sure if I can “refinance” out of a loan from my parents.

Anyone have thoughts on how to make it work?