Issue Launching Multiplayer

Hi all. I’ve spent a while creating a board game with chess like piece movements using Replit. It has two modes, AI and multiplayer. I’ve published the game and AI mode is working very well when multiple users are playing. But I am having a HUGE issue with Multiplayer. Multiple users are able to create rooms/use join code and games can get setup and begin. But once gameplay begins, all games eventually freeze/stop working.

I am asking for advice on some prompt language I should use to help Replit Agent fix my multiplayer. I have tried debugging for hours on end and I cannot come up with a solution. Any time it tries to fix the issue the game ends up breaking more and the issue persists. Any help would be much appreciated. Thanks!