Problem communicating between arduino UNO R3 and Mega 2560 via MAX485
You have forgotten to add mySerial.flush().

mySerial.flush() waits for the transmission of outgoing serial data to complete.

Add it right after you have sent the data and want to change the DE pin status.