Please ensure that you are connected to a steady network, whether it is Wi-Fi or mobile data (3G/4G/5G).
 
Even if connection bars are full, it only sometimes guarantees a solid Internet connection because networks can sometimes slow down or get overburdened, especially when you are playing in a moving vehicle.
 
Keep in mind that you may lose connection with the game if you are inactive for about a minute and this game's behaviour is not a mistake.