Is recommendation letter a completely professional thing or keeping good personal relation with the writer required?
If you did well during your PhD (and did not have a fight with your supervisor afterwards), your supervisor should write a good recommendation letter. Recommendation letters are professional and you do not need to keep a good personal relation. It happens often that people have to ask for recommendation letters some time after moving on to somewhere else.

The only advantage of being still there could be that it would make it easier to remind your supervisor if he takes too long to write the letter.