"My team was fantastic during the whole race. Today I felt very good, my legs were really good, until the attack I could ride easily. Also, I was very motivated. Many people supported me along the roads, and I want to thank everyone," Valter said after the race.
The match ended in a goalless draw, despite Botafogo's 17 shots on goal to Coritiba's seven.
Fiorentina loanee Pedro put the visitors ahead in just the second minute by pouncing on an errant pass and sliding home from close range.
Members of the US women's team filed a lawsuit against their federation in March because of alleged discrimination over wages. A federal judge ruled against the players, who have since lodged an appeal.
With his final stage win, Valter became the overall winner of this year's Tour de Hongrie.
Fourth seed Naomi Osaka of Japan booked her place in the third round with a comfortable 6-1, 6-2 win over Italy's Camila Giorgi.
"This is not the way I'd imagined taking the yellow jersey," Yates said, "If I'm honest, no one wants to take the jersey like this."
Flamengo netted twice in quick succession after the restart: first with a stunning first-time effort from playmaker Everton Ribeiro and then with a cool Arrascaeta finish after a counterattack.
The 31-year-old's poor relationship with Real Madrid coach Zinedine Zidane is well documented and was made clear when Zidane only used him in two of the 12 games his side played when Spanish football resumed in June after lockdown.
Valter, 22, broke free during the final few kilometers and the peloton was unable to catch him.
The 28-year-old is now 16th in the overall rankings, 16 seconds behind new leader Yates.