I saw this kind of behaviour, reported in this message. However I already saw Ottoman AI stuck at 25 at first, and for no reason later in the game (at 35min mark in treaty), it finally found the appropriate tech to increase settlers count later :
I find that the Ottoman AI sometimes does make more than 25 vils by building the mosque, while other times it doesn’t. Is that part of it’s logic?
I am attaching a recording below. The Ottoman AI did not try to increase cap beyond 25 in this game, but not sure if it did that because it was confident that our team had won.