and here is the save file
You attached a Civ V save file from a Babylon game, not a Civ VI save file.
I can confirm I had this bug in my last game for one of the cities, exactly as shown in the screenshot.
I am 70% sure I manually built walls in Corinth but never upgraded. Most walls in my empire were freely built within a few turns after I had completed them in Corinth
Sorry, had a long day
This is also happening to me.
Ah. That's a shame. Thanks for clearing it up!You have the same issue -- the only city with ancient walls that shows the grayed out inability to build medieval walls is in Agra, where your city fortification health is only 197/200. I'm guessing that your walls were damaged sometime before you unlocked Civil Engineering and weren't repaired before that civic unlocked. Once that civic unlocks, you can no longer repair old walls, and this glitch appears.