Resetting the board will fix it and it'll work again, but every time, putting my computer to sleep and waking up will cause it to stop being able to be controlled. When this happens, I've checked on other computers and they are still able control the board. Desktop is connected to the network via ethernet.
This also happened with my Samsung Galaxy S21 Ultra. I can't get it to happen consistently, but my phone will also sometimes stop being able to reach the board.
Same again with my laptop. Waking or starting up my laptop while the board is running, I can't control it. Resetting the board will get it to work. Also happens consistently. Laptop is connected to network over wifi.
My original program uses the BasicOTA example which I've modified, however, this happens even with a basic program that only connects to wifi and does nothing else.