The only time you leave ocean dead ends WITH sufficient boat colors to travel is when the tiles run out. In this case, they die anyways.
Technically, they don't die, they just sit on the water tile. It only makes a difference if you get to the second tiebreaker, which says the player with the fewest boats on the board wins. Boats still on the foam count against you.