This has been going on for a long time (I could search all my posts and find when I first noticed it but it was a long time ago now -- probably half a year to a year ago), I made note of it in some post for what seems like eons ago. Basically the supply limit keeps changing or recalculating during the turns and between turns and god knows when or why. As far as I can recall it only happens during prolonged war time. But it can be somewhat manipulated during your turns -- you can lock citizens, specialists, lock growth, move them about a bit etc to manipulate it into being "good" and then do what you want (such as buying a unit) and it usually then turns bad again -- if you buy a unit, pay for a building etc. The worst part is if you have authority it will sometimes eat free units and city-state gift units since it considers you to be over the supply cap limit. It can be in a bad state and all I have to do is lock/unlock growth a few times and it might shift to a good state and then I can buy or queue some units only for them to later then shift back to bad again, bought units will appear but units in the build queue will just cancel and not appear and it will move along the queue to the next item it can build (usually a building or civilian unit or it will prompt for input next turn).
The weird thing is that it is recalculating constantly and not just between turns. It can recalculate as soon as you do something in one of your cities. So you can be over the cap, go into a city and move somethings around, the toolbar then notes that you are "good". Exit the city. Enter the city again and it now considers you to be "good" so you can buy a unit again. Which triggers recalculation and you are once again bad. Repeat until you hit the real cap. There is a real hard limit when you can't do it any longer but that one is far different from the one that is shown. The worst part is I guess if you have cities that are building units and it triggers on the between turn all those developments just don't happen. Or they do happen but they don't produce units but it keep the hammers overflow so you can sink it into other things.
So best guess it's some thing with war weariness and supply that keeps getting recalculated as soon as yields change for one reason or another. It's probably %-based. If you lock all citizens in place it seems to be "better". But then if you have a lot of currently conquered cities you can't do that with those tends to be the problem cities that are causing it for the whole empire.
As far as pops go this isn't really my main issue any longer, it's been around for a while so I learned to live with it. My current issue are all these ghost-pops that keep appearing in cities. Where you have many more pops then the size of the city. You can reset tiles and locked pops/specialists but that doesn't even remove all of them and in a few turns there will have been new once spawned and I just don't know why, how or what to do about them. They are wrecking havoc on the happiness tho since they really screw with the overall happiness. At first I thought they were just ghost-pops that didn't matter but they do matter and they do produce yields as far as I can tell. But basically the entire UI is very untrustworthy in that regard since it appears it can be manipulated at a whim and you never really know how long that will last for.