they assembled all of wg power only to face one yonko and they were not sure if they could win on the first place
then come shanks unsheathed his sword at the time when marines on the upperhand and driven by bloodlust to annihilated pirates party but they are all knew their place, they obey him.
same like onigashima or WCI, They simply coudlnt, even wb think twice when it"s about invading onigashima and roger clearly sneak in and using tactical and his brain instead just use power,
all is because all the yonko in their own turf is so hard to predicted and measure in power and forces, the other party couldnt handle taking the risk. kaido in onigashima and bm in wci, each teritory island is have unique way to defend, esp by huge force that marching to it. just entering the gate of the teritory itself is will be cost much of casualities. marine ships could sail on the way to onigashima only happen because the Beast pirates busy with alliance, but it is 1 : 1000000 moment. but if beast pirates werent occupied,,they will simply annihilated them,, even BMP is have hard time just to enter oniigashima, the alliance could enter because they have "inside men"