The difference is just in the class. The WDP4 and the WDG4 series are practically identical. Only the control software and the gear ratios/weights etc are different between the two classes. So, ideally there should not be any problem in MU'ing them.
But, in this case, I don't think the WDP4 is live. It is connected, yes, but not providing any traction.
It's the same with the WAG5-WAG7 pair as well. Both are based on the same technology and work on the same principle. So, in theory they can be MU'ed.
However,...
more... I don't think IR uses odd pairs like these often. Even in such cases, both locos might be manned and run independently by the crew. The crew will communicate with each other to maintain the speed/braking etc.