It can go either way:
How Team 7 can win:
-Kakashi teleports Sakura away into Kamui Dimension
-Naruto creates clones to help Kakashi out with Obito.
-Naruto creates a clone to absorb nature energy, so basically infinite chakra.
-Naruto creates more clones to help Sasuke with Madara
-Naruto and his clones hold off kaguya for a while until Jubito and Madara gets defeated
-Team 7 come back together. As Naruto and Sasuke tries to seal Kaguya, Sakura gets teleported back from Kamui and lands a hit on Kaguya, preventing her from escaping and thus leading to her getting sealed.
How The Final 3 can win:
-Sakura gets taken out due to collateral damage
-Kaguya spams her needle technique at sasuke's and Kakashi's susanoo until they break down.
-Madara keeps Sasuke busy while his limbo clones finish off Kakashi
-Obito gets taken out by Naruto's clones
- down to Sasuke and Naruto vs Kaguya and Madara
-Kaguya teleports all of them to the desert, and leaves them there to die from dehydration. Otherwise, it'll be a stalemate