The endless refuse-to-talk issue caused by a flip is still on it's way. Let's dig into the code to see why:
The example is Arabia flipping Byzantium cities in 600AD Scenario, which is simple to test and reproduce. According to the code from Rise.py:
if chance(iRefusalModifier):
player(iOwner).AI_changeMemoryCount(self.iPlayer, MemoryTypes.MEMORY_STOPPED_TRADING_RECENT, turns(5 + iRefusalModifier / 10))
Given that Byzantium's iRefusalModifier = 20, it means that there's a 20% chance that Byzantium will refuse to talk to Arabia, in which case 7 MemoryCount is added.
So I assume your intention is that the refuse-to-talk is expected to last for 7 turns, but it's totally not running in that way. According to the dll-code from CvPlayerAI.cpp:
if (GC.getGameINLINE().getSorenRandNum(iMemoryDecayRand, "Memory Decay") == 0)
{
AI_changeMemoryCount(((PlayerTypes)iI), ((MemoryTypes)iJ), bFrenchUP ? -2 : -1);
}
Given that Justinian's iMemoryDecayRand (type = MEMORY_STOPPED_TRADING_RECENT) = 30, it means that for every check, Byzantium has a 1/30 chance to reduce the MemoryCount by 1. To calculate in a simple way, you need 30 * 7 = 210 turns on average to clear up all MemoryCounts and resume contact.
Honestly, I'm not understanding why this rule is introduced, and a simple way to get rid of the issue is to remove the refuse-to-talk-by-flip rule.