Hello. I have searched the internet and have not found anyone else who has had this specific problem.
In an earlier game I got pretty far into it, about 80 hours. Completed the thieves guild. Playing the main quest. At some point a very noticeable bug turns up, specifically in whiterun. All of the npc's in the town except for the guards all went into flee mode. Many of them gathered in the inn and just stayed there. There were some in other parts of town as well. The companions guild were frozen as well, but they eventually got better. The rest didn't. I tried using the console to fix them. Disabling and re-enabling. Resetting AI. It didn't exactly work.
They were no longer in flee mode, but still wouldn't move and just stayed in one place.You could talk to them, but the shopkeepers wouldn't be able to trade anything. I I tried attacking them they would cower and call for help, but not move. If I took their health to zero, it would immediately go all the way back up. Not just essential npc's but all of them. Since I had a house in whiterun and went there often for a lot of other things this was a problem.
Recently I have played a newer game. It was going fine for a while, but then something happened in solitude. The npc's walking the streets mostly seemed to vanish, again except for the guards. The shopkeepers wouldn't leave their shops. One shop actually had the people inside say that I should leave and am not supposed to be there, even though it was the middle of the day when the store should be open. They actually called the guards and a fight started.
So I don't know what is causing all of this. I don't have many mods, and in this newer game I made sure they were all cleaned thoroughly. This just seems to make the game unplayable.That's about it.