Oh hah I think you found a bug lol (or a feature?)
I'm new to writing game AI so you can just chalk it up to that :) I added a line to make the CPU favor quicker "checkmates" if it found multiple so my guess is it saw both outcomes and went with the quicker one. That's really funny to me that it just yeeted its own forgekeeper.