Nobody likes being a back up friend to only be called on when your primary friend is unavailable, or you want to do something your primary friend wouldn't like. Countries make treaties/trade agreements accordingly
No, but depending on your (presumed national security) needs, you might be able to repurpose a ship that was almost done for another client. If you have active local shipbuilders, there should be some capacity there.
But, the trick is, how do you do it? The US Jones Act is trying, but US ship building capacity is pretty minimal. Just ordering military ships on the regular is expensive... Etc.
Some people might go so far as to put a lot of the blame for the sorry state of affairs _on_ the Jones Act.
(Though to be fair, while the Jones Act alone could probably snuff out American ship building, even without it most ships would probably still be build in South Korea. But you can fairly blame the Jones Act for suppressing US-to-US ocean shipping.)
Of course, you can also look for some closer-to-home backup friends.
My main point is that close allies (both geographically and in terms of relationship) are about as good as having your own local industry. In a few important cases and areas, having production with friends is better than at home.
Mostly because it's harder for local political interests to capture a foreign economy.