Why?
Perez overtook under safety car, but kept the advantage on the restart stopping Carlos challenging Max
Yeah, I saw that. Is there a rule saying that he must give back that position before the SC period ends? If no, then he did that legally. Referees agreed with that and didn't serve a penalty for Perez.
If it's not by the rules to pass under safety car, it stands to reason that you should give it back, otherwise a team mate would pass before a restart to protect their other driver and then give back later.
Nope, the team by a driver to ignore track rules allowed them to gain an advantage. It isn't just Perez. If they had applied the rules Carlos could have threatened Max.