RS-485 Connecting 100 devices - Avoid GND Loop
To overcome those problems, you should start to think about using isolated transceiver. Additionally you would need few RS485 repeaters, because a tiny 485 transceiver can't drive 100 devices at once.
By the way, you don't connect the PE directly on transceiver, it's just for the ESD protection potential. If integrated into IC then yes, you connect it to GND of the secondary,... there are various possibilities best if implemented as declared from manufacturer.
Example 1  You can see GND3 is floating, tied to earth potential though a capacitive coupling 4.7n and by means of high resistance 1M.

Example 2  Same manufacturer, now the earth potential is connected directly to IC. Note: In both circuits only A and B are connected to the other node.