“A common issue that happens when building a web server using client.print() is that Google Chrome makes an extra connection – it creates a new client and lefts the connection opened.
That’s possible the reason for you to say that “It seem to be related to the opening of an already opened browser at the url”.
This is somehow problematic because it doesn’t allow any client to connect until that random connection is closed. To solve that issue, we create a timer that closes all the connections after a predetermined number of seconds.”
How do you do that?
It is explained here: https://rntlab.com/question/solved-esp32-web-server-drops-connection-crashes/
Alternatively, you can build your web servers using the AsyncWebServer library. This problem doesn’t happen.