A two-year-old child is too young to understand that it is not desirable to be as free at a neighbour's house as at home, especially if the neighbour is affectionate. Children want to spend time where they get love and attention. Setting a routine for him for his meals and play time is important. Explaining in simple and direct terms that too much time at the neighbour's house is not desirable as it may disturb them could help. Otherwise you should stop worrying about it if your neighbours are comfortable with it.