I had two pirate shipyards relatively close to one another. I sent out a fleet and destroyed one of them. I then proceeded to the second shipyard and tried to destroy it, but I wasn't able to engage it. I right-clicked on my fleet and left clicked on the shipyard but nothing happened, and no I wasn't out of moves. I tried for two or three consecutive turns without success and then gave up. I left a fleet there to pick off the pirate ships as they were created. Is there a reason why I couldn't destroy that second shipyard, or is this a bug?
I encountered this too - but while testing out some mods, I thought something must be interfering.
Do you happen to have a save of the situation?
Edit, turns out I saved a situation where it happens myself: it turns out if I order a ship to attack the pirate shipyard, it works OK, but if I hit cancel I become unable to attack the shipyard anymore.