All this and he still couldn´t defeat Naruto, Madara, Kaguya, Bald Akatsuki Guy
He defeated Naruto 3 times,the last battle was a draw due to plot - take note on how Masashi convinietely made sure Sasuke lost his sword right before fighting Naruto,and had Sasuke not use multiple techniques on Naruto (Chibaku Tensei,Bansho Tenin),with no explanation.
As for Madara,and Kaguya - that was 12+ years ago,and obviously he wasn't going all out against the Akatsuki guy.
Based on Naruto's words of Sasuke being the greatest Shinobi,and Sasuke's potential of being able to use/learn/master nearly every jutsu in the world + all the Rinnegan Paths - Logically he is the best Shinobi besides Madara - Kaguya wasn't a Shinobi.