Any way to prevent "pirate juggling?"
Arrr, that situation where some of your carefully planned crew goes to the new ship and pathetic pirates promote themselves to officer...
Block all the crew vacancies on the new ship before it docks; actually blocking only the captain slot is sufficient.
When your other ships have some of their crew off ship, sound their boarding calls - any mission will do, you will cancel the boarding call before they sail. In this state, none of their crew will juggle about when you clear the slots on the new ship. Set the game speed to slow while you crew the new ship, and check that none of the other ships are about to get all crew on board and set sail.
When the new ship has the desired crew, cancel the boarding calls on the other ships. All crew will stay with their current ships.
While ships have their boarding call sounded, you can still fire crew from them. The empty slot won't be filled until the boarding call is cancelled.