Wasn't sure if this is a build or a battle issue, but its because of the way the base is built, although technically within the rules. I've only seen it twice, but it leads to some very buggy troop behavior when all thats left is GS. The normal ship blocks front entrance to the pier, the rope along the top side prevents side access, and the rock prevents the south side access. If you don't have ranged units, its likely impossible to attack.
There are always gaps between the rocks and whatever you place beside them. I could be wrong but the pirates could/would just swim to the end of the pier near the rocks and access the GS from there. There are also a few threads now reporting unusual troop behaviour around the GS (and not related to placement near rocks)