issue might be causing due its use of hooks and their dependency array, found another topic from forum where they were discussing about similar situations, give it a look and see if that is useful, happy coding
Build a Tic-Tac-Toe Game - Build a Tic-Tac-Toe Game