Client disconnects after losing connection for half a second

Godot Version

4.6.1.stable

Question

I’ve made multiple online multiplayer games, and all of them have had the same issue:

If a client loses internet or connection for half a second, even if it regains internet right after, a few seconds later it will disconnect from the server. How do I fix this?