The Yamato in "Where Silence Has Lease" was NCC-1305-E, though that was an illusion generated by Nagilum. It checked out as far as Riker was concerned. The real Yamato was seen later with a different registry.
But, of course, NCC-1305-E was an original intention of the producers, they only changed their mind (unfortunately, I should add).
In my world the Galaxy Class USS Yamato
is the fifth starship to bear this name, similar story with some of the ships they named Valiant