AI didn't do it to SO. SO's new ownership did it to SO. It's a hostile place with or without AI.
Unfortunately they changed ownership very close to when ChatGPT got released, so I can't point to timing, but there's just no way this is not because of AI.
SO's extreme hostility definitely drove people to the first viable alternative (AI) as quickly as possible, so it might have survived longer if it hadn't been so hostile.
But to be honest I expect that would have just delayed its death. AI is so good now I think I'd use it even if Stackoverflow was really friendly.
The same decline is visible on all Stack Exchange sites, regardless of moderation policy.