@Banenabos - if you have a situation where the GW is just within reach, if the node during some circumstances does not reach the GW it will after 6 (?) tries start to search for a new way. In this way it might be the node hops back and forth between the GW and Repeater->GW.
I dont know whats the best practice is but when I had these situations i forced the ID to the repeater which was closest and most solid connection.
Not very knowing in the code but above is based on observation and what works best for me.
For example my rain/bucket sensor which is located in the garden can sometimes reach the GW directly but I lost connection to it back and forth. I added a repeater but for some reason it preferred the GW directly (less hops?) and lost connection over and over so I force it to use the repeater.