In general, I was able to upgrade EOS version on both MLAG domain switches to 4.18.5M without packet loss.
Using the method of sequential search, I found that from version 4.14.5FX.2 it's possible to upgrade to version 4.20.2.1F or 4.20.5F.
You need to upgrade first switch to one of these versions. After that, you need to upgrade second switch to 4.18.5M. Coupled with version 4.20.5F, peer-config is inconsistent, but this does not prevent the switch from working properly as a switch, since I do not use other functions on the TOR switches. The last step is to change the EOS on the first switch to 4.18.5M.
It should be said that with version 4.20.2.1F on both MLAG domain switches there were problems with STP. Cisco PVST switches (directly connected to MSTP MLAG domain) changed the state of the ports to an err-disabled. In my case it was better not to take risks and use the transition version 4.20.5F.