If we really want Rodrygo, we should not delay too much in selling Diaz to Bayern because they would be our main competition for the Brazilian and Madrid would want nothing more than an auction between two big clubs to drive the price into the stratosphere. Replacing Diaz with Rodrygo does seem like a no-brainer, if the money is similar.
That being said, Real are starting the bidding very high (way higher than we will get for Diaz) and this seems like a potential transfer saga that could go down to the last day of the window. So if we sell Diaz, we will have to be cognizant of a very real risk that we will not replace him with anyone until at least January.