From bsky comments: "...technical answer: because it's done by a government warship. (Doesn't mean it's not a crime, just means it's a different crime than how the law of the sea defines piracy)"
https://en.wikipedia.org/wiki/United_Nations_Convention_on_the_Law_of_the_Sea #Venezuela