Thenathu:
Are the pump and motor far apart?
You can reference the same line with both the pump case drain and the motor case drain if possible. This removes some of the variations.
Or, if it is not possible to actually connect both drains to the same line, then use a flushing relief valve with an external drain port and reference that to the pump case pressure. This at least removes the effect of the line from motor back to pump or tank.
Sauer at least, and probably others, uses a shuttle with blocked center (to be able to tell the motor flushing has started by seeing the charge pressure drop slightly when the system is brought onto a load), then a fairly low cracking relief valve maybe 75-150 psi, then an orifice either in the circuit or in the porting of relief valve.
They then have a fairly low shift point to start flushing, but a fairly steep rate of pressure rise with increasing flushing flow. This makes it much easier to have some pump flow and some motor flow, even if the exact proportions vary.
If the relief valve is larger and with a fairly flat pressure vs. flow curve, then it is difficult to balance. If flushing RV is set just slightly high, motor flow drops dramatically and most flow goes to pump. If flushing RV is just a bit too low, most flow goes out motor and not much at pump.
Relying more on the shape of the orifice flow curve, which steeply rises as a squared term, instead of the relief valve curve, which can be fairly flat, makes it much more reliable to set and operate.