Even if you contribute and or own identical amounts, in your situation, as parents of non-shared children, I would buy as tenants in common rather than joint tenants.
As tenants in common you can each leave your share directly to your children.
You then have the option in your will to leave a life interest in the house to the surviving spouse, enabling them to stay in the house until they die or cohabit or remarry, for example, at which point the children gain their inheritance.
As joint tenants when one dies the whole ownership automatically reverts to the surviving partner. Your respective kids are then vulnerable to the Will of the survivor.
Two of my friends saw their widowed Dad marry younger women, put all the money into a shared house with her, only to die, and then years later receive nothing from the second wive’s Will.
Your solicitor can draw up a deed showing % of ownership: for example if on a £200k house one of you puts in 70k deposit, the other £30k and you pay for the £100k mortgage 50/50 then one owns 60% and one 40% once all the mortgage is paid off.
OR state the amount of deposit each pays and say that on sale each reclaims their deposit at the value it now represents. So if you put in £50k deposit and the house / equity at point of sale, doubles in value, then you get £100k back as deposit, and your partner’s deposit is increased by the same value, and you then split the equity, if you paid the mortgage between you.
If your deposits are of very different value, I would be wary of simply ringfencing the cash value. I say this from bitter experience.
I did that with a deposit of nearly £150k against my DP’s £25k. By the time we sold the house had doubled in value, I got my £150k back before the rest was divided, and he got his£25k, but he benefitted from half of the increase in value if that £150k.