You could put a restriction or charge on the property to protect your interest but this could put the potential mortgage lender off - if the house has to be sold, there may not be enough in the pot to pay off the mortgage and your loan.
You could draw a contract up with your son which, if done properly, would be legally binding. The problem would be enforcing it - if he couldn't pay because he hasn't got the money you can't get blood out of a stone.
An alternative would be to buy the house with your son and his girlfriend. You would own the house as tenants in common, with your son and girlfriend owning 45% each and you owning the remaining 10%, as an example. Or a 40/40/20 split.
This would need to be given very serious thought as there are implications, but it would protect your interest.
If you do consider this get proper legal advice first.