I messed up my LUKS partition

And i assume that you have no backup dump of the partition table right?

I researched a bit. Testdisk can’t recognize the size for a LUKS partition. There it is needed to set it yourself. Here is a hint of a more competent person: https://forum.cgsecurity.org/phpBB3/viewtopic.php?p=26149#p26149

But anyway. I would recommend to make a backup with dd and try this on an image and not on the physical drive.