Hello
Take a look on the following note:
634038 - MRP: Returns order and delivery
The following information is displayed on this note:
The delivery for a stock transfer returns order must be relevant for the materials planning (the delivery then replaces the release as an expected receipt element).
The delivery for a return to vendor must not be relevant for the materials planning (the release is outside of the system with the external supplier and therefore cannot be replaced by the delivery, the purchase order remains as the relevant element for planning purposes).
See also the information provided on the FAQ note 606282, which confirms that only a return delivery for a stock transfer must be relevant to MRP. That's why you are seeing this MRP element on transaction MD04.
BR
Caetano