with a mortgage, you control the property yet have none of the risks of actually owning it.
Renting, you have no control - the owner can kick you out at the end of your lease, make arbitrary rules about who can live there...If you only need a few months, rent. If you need longer term stability, mortgage.
I've been kicked out of a rental that I thought I would be in for longer - its stressful for the family, disruptive as hell, and its expensive. Lesson: have control of things that matter.