It's probably a problem with the sector size. Some USB enclosures claim their drives have 4KiB sectors, when the drive represents itself as 512 byte sectors or vice versa. Partition tables (both msdos and gpt) unfortunately depend on the sector size. If the sector size changes, the partition table becomes invalid.
Now, this is a problem that could be solved in software - Linux could be made smart enough to interpret a GPT partition table correctly, regardless of the physical sector size the drive claims to have. But it doesn't do that, and it's probably not part of the standard, so ...
What you need to do is get the exact byte offsets of your partitions while in the USB closure
parted /dev/usbdrive unit b print free
and then see if those partition offsets work for the internal drive
losetup --find --show --read-only --offset 1048576 /dev/internaldrive
file -s /dev/loopX
and if that works out okay, re-create the partition table with the same (byte) offsets for the internal disk (make a backup of the first/last few megabytes of the disk first)
parted /dev/internaldisk unit b mklabel gpt mkpart 1048576 42424242 ...
I don't know if there is a partitioner that is smart enough to 'repair' such wrong-sector-size partition tables automagically. It would beat the manual approach but ...