swap files make setting up hibernation a bit more complicated - in most cases the file has to be contiguous, e.g. you have to defragment it once after allocating. Then, you need to tell the bootloader the byte offset of the file on the partition.
If you want to share step-by-step, I’ll update the gist.
Does contiguousness matter these days? Especially since all disk locations are lies anyway as SSD firmware has its own layer of indirection too?