Looking at population density at a global level, or at a national level, is going to be giving you misleading results. If your goal is to evaluate whether people in history lived close to other people, you need a very different metric: Population density of the neighborhood where the median person lives.
For instance, if you look at population density overall, Germany has a far higher population density than Spain. This is, however, because most of Spain is empty. Even when you look at rural areas, what you see is not American style homesteads, but people living in a relatively dense village, and traveling to their farm. In that environment, social isolation is very difficult: Just buying food and going to some kind of workplace leads to being very close to a whole lot more people than, say, your average American does.
So when we go back in time in most places, we might not see that much cross-settlement travel, but how dense are the settlements? How much can you avoid other human beings? Just like travel was dangerous, living in a place that was a long distance from your next neighbor was also dangerous: The best protection against attack was to have enough neighbors very close, as to make it really difficult to get away with attacking you. We have ruins of many settlements, going back well before writing, and it's normal to see places that might have housed a dozen or so families, all in screaming distance.
Therefore, I don't see how we can support that some form of relative social isolation was the norm everywhere. If anything, it's the modern American suburb, where in practice we don't need to exchange a word with the neighbors, and most retail transactions are impersonal, is what happens to be historically novel. The pandemic just made it more extreme.