OK, if it is your own code in the Arduino, you have to change your logic. I presume (would help if you posted som code snippets) that you do some thing like
read serial line getting one x or y coordinate
move x motor if it was x
move y motor if it was y
Read code from serial with x and y (possibly waiting until you have recieved both)
Which is the longer x or y ?
if x loop for x steps
move x one step.
move y so it matches (total x moved) * y / x ( which may be no step )
if y .. the other way round ..
Note that it is important how you calculate the diagonal position to avoid various rounding errors.
BTW, the Gcode does it like that - one command includes all axis information. The firmware then does the diagonal lines (or arcs ...)