It was not the dock the thing the ship was attacking, but apparently that house on the right corner (arrows went past beyond the dock, but the screenshot I took made it look like the ship was attacking the former).
It really has some weird bugs… Let’s not forget the scout/lion one, with both units repeatedly attacking the air for some reason.