Rodrygo is a young, fast, and high-quality player. He could always play for the Brazilian national team because his manager, Carlo Ancelotti, knows him well. If he doesn't get enough playing time at Real Madrid, it would perhaps be better for him to avoid a transfer to another team. It's difficult to predict his current situation, but I hope the decision he makes is the best one for him.
Staying back at Real Madrid when he’ll not be used by the manager is not the best idea for his career. If he does that, his performance will continue to drop and he’ll even end up not getting what he needs from his former manager in the Brazil national team. If he can play up to the standard to take a spot in the Brazilian team, no matter the relationship he has with Ancelotti won’t make him get to play there as he wants. He needs to remain fit, active and show worthiness of the task given to him to represent the national team and he can only achieve that if he’s actively getting to play in Real Madrid as usual.