Yeah, I had a personal experience with this about ten years ago when we moved to Arkansas. I was traveling back and forth from Memphis to my new job for a few months while we were looking for a new house, and when we eventually found what we were looking for, my father in law loaned us some money to close on the new house while we were still selling our old one.
Long story short, after looking through the last 3 months of bank statements, the mortgage company wanted a letter from my father in law stating that it was a gift which he of course did not want to do k since it look well over the untaxed threshold. So plan B was to go to the courthouse and file it as a loan, and it was written up in a way that ensured that he'd be paid back immediately after selling our old house. This was the only way that we could get approved for the new mortgage while still owning our old home as well, and it was a complete nightmare at the time, but it makes sense thinking back on it,