The same thing happened to me when I bought freighters three times. The first time I freaked out too. Didn’t want to take any chances so I reset to an earlier save. The second time I had a couple of save points, so I took a chance, dropped to Mode Select screen and reloaded and my ships were there. Just make sure you have a previous save to spare and you’ll be safe.
I had a similar but different disaster happen. I came upon a trading post that an Exotic ship appeared at out of the blue. It was a great example and I had skipped two others which had too few slots available, so I jumped at the chance so I bought it. Well, I evidently had the blessing of Emily that day because they kept appearing! I bought them all because I was rich enough with the discounts. I went back to my Freighter and swapped out my A and S Class Fighter, Explorer and Hauler one at a time, swapped ships - thank God trading posts have seven pads! - and brought the Exotics back one by one to the Freighter. I changed my mind on the last one, one of those blue editions with the one tall blade, because I dearly loved my fighter. We’d been through a lot and I’m a sentimental slob. I was snapping pics of my Hauler because it was a fine example itself, bumped into my Fighter before I reclaimed it, and off it went drifting. In my horror I dropped to Mode Select but remembered that if you do, any unclamed ships vanish. But I knew of no way I could have saved it anyhow, so I moped back to my Freighter with the Exotic, and am using it now as I hunt for another example of my lost fighter.
Lost: Uroishig S72. If found, message Nigel Fox.
And no, after the Reset, they don’t show up at the original system anymore, sigh.