I guess the bank would want something in writing saying the person won't exercise rights gained through living there. Just wondered if anyone else had done it really, assumed it was common.
It is common, broadly for the reasons you describe - there's a risk that a cohabitee can obtain an equitable interest in the property by living there and contributing to costs.
Although I’ve not heard of that from a lender only when someone is worried about their estate planning