This is how you build your network.
I assume that you use these :
Node 1 is the MAX485 RS-485 Module connected to your gateway.
Node N is the MAX485 RS-485 Module connected to your last sensor of your network.
Between node 1 and N you can add addtional nodes but you need to keep the bus structure.
Important are the terminating resistors (1) and (2). They are R7 on the RS-485 module.
If you add modules between node 1 and node N and you have a failure in transmitting, check then with removal of R7 on that added node.