@mardah
Hi! Home assistant sends a request for gateway version every 10 seconds and if the gateway doesn't respond with version within another 10 seconds, home assistant disconnects from the gateway and tries to reconnect.
Have you monitored your gateway serial port during these tests? Seeing that side of the conversation would be interesting. The gateway not responding to the version request is a sign that something is not working properly with the gateway, or that it is unstable. Once I had this issue when I had built the gateway sketch with an avr version that had a bug, and caused the gateway to reboot when starting the communication.
This post describes what version of avr had the bug:
https://forum.mysensors.org/topic/6257/ethernet-gateway-home-assitant/4