AI (Hardest) Stops and Restarts Wonder construction if player finishes first

I don’t know how to let you see the game I am referring to but this is my steam link: Steam Community :: zbee and my match history is set to shared - the game is on 2021-11-01, Custom, 1 player, Standard game, on Confluence, with a Victory result.

I played a custom game 1v1 vs the Hardest AI, wonder only victory condition and high resources - both players immediately started building wonders. However, the AI was building auxiliary and military buildings as well, so I finished my wonder first.
At this point the AI’s wonder was less than 400 away from completing the wonder. When I finished my wonder, the AI stopped construction on their wonder … and started a second one. This one finished a good 5 minutes later with their extra TCs.
The cost of 2 wonders was more than enough to completely hamper their whole build order, and the AI was not able to attack until there was 2 minutes left on my wonder, completely throwing the game.

The main issue here isn’t how the AI handles wonder only victory games, wonder only victory games with high resources, or high resource games. The issue is that when a wonder was completed the AI stopped work on their wonder (wrong) and started a brand new wonder (wrong).