Every Top-20 player had to suffer at least a couple of losses in those matches when they should have won, having everything in their hands before ending on the losing side.
TennisTV released an interesting video with an excellent selection of those matches, starting with Karen Khachanov and Dominic Thiem from Beijing 2019. The Russian led 6-2, 5-3 before the Austrian came back to steal the set in the tie break and force a decider. Dominic won the final set in another tie break to prevail after two hours and 40 minutes and leave Karen empty-handed.
Five years earlier, Stan Wawrinka had no less than four match points against the fellow Swiss Roger Federer, wasting them all to suffer one of his toughest losses in the entire career. Stan went to the net on his first three match points, which brought him nothing, and Roger found a way to score a 4-6, 7-5, 7-6 victory after two hours and 48 minutes following a perfect volley winner at the net.
Andy Murray prevailed over Milos Raonic at the ATP Finals 2016 after fending off a match point in a 5-7, 7-6 victory after three hours and 38 minutes.