RS485 waveform distortion
Why is the amplitude changed on half of the waveform?
Why does this only happen when the other RS485 device is connected at the opposite end?

The simple answer is that the &quot;other&quot; RS485 device must be heavily loading the bus - probably by trying to drive it at the same time as the &quot;first&quot; RS485 device (as brhans also suggested in a comment).
Remember that RS485 defines an electrical interface, but not a protocol. As shown in the schematic, you are using normal half-duplex RS485 on a 2-wire bus. Therefore it is up to the system designer to implement a communications protocol which prevents more than one RS485 device (node) transmitting at the same time.
Assuming that both devices use the same schematic, then you need to ensure that only one RS485 device uses signal UART4_TXEN to drive the bus, at any given time.
If one device can be considered a &quot;Master&quot; and the other considered a &quot;Slave&quot;, then having the Master device poll the Slave device, using appropriate switching between Tx and Rx modes on each device so that they are not both in Tx mode at the same time, can be considered as the start of a protocol definition.
However if, in your system, both devices could transmit at any time (including at the same time) then you could consider using a full-duplex bus between them e.g. what is sometimes called 4-wire RS485 (which is really just two, 2-wire RS485 buses). That is only a potential solution in a simple two-device point-to-point configuration.
The topic of which RS485 protocol to use has been discussed in previous questions. Modbus is one standard.