The Doll People Set Sail by Ann M. Martin
Annabelle Doll and Tiffany Funcraft, along with their families are packed up, then placed accidentally by the family in a pile of boxes going to a charity destination instead of into the attic for safe keeping.
The dolls are very surprised when their box gets loaded onto a pallet, then dumped onto a ship in the ocean. Turns out they are not alone and it is up to them and their friends to get themselves home again!
They travel thousands of miles, face many dangers not the least is some of them fall out of the box, and then need to be rescued by the others. Annabelle herself slides down the anchor chain and has to climb back up before she falls in the ocean.
Book # 4 keeps you on your toes and rooting for the family of dolls that just want to go home.