I've recently changed from a SATA SSD to NVMe SSD for my Windows PC and there's a format option for the NVMe SSD to use 4096 byte sectors for better performance. Changing this erases the contents and I had already copied everything to it so I had to use the SATA SSD as a backup copy. Shrinking the filesystem before starting helps here.
The EFI System Partition (FAT32) must be at least 257MB (65537 * 4096 bytes; normally 260MB) for a disk with 4096 byte sectors. I recreated this and copied the files for it. Windows is unable to modify the older 100MB partition configured for 512 byte sectors, even though it can boot from it. To be able to boot, the disk and partition GUIDs must be preserved when recreating the partitions.
The NTFS boot sector (at the start of the partition) contains references to the sector size of the disk. This is unnecessary information on more modern filesystems but NTFS is 28 years old. Changing the following little-endian values allows Windows to use the filesystem without needing to recreate it (instructions assume a 4K cluster size):
|0x0B||Bytes per sector||0x0200 (512) → 0x1000 (4096)|
|0x0D||Sectors per cluster||0x08 (8 * 512 = 4096) → 0x01 (1 * 4096 = 4096)|
|0x1C||Hidden sectors||The number of sectors preceding the partition|
|0x28||Total sectors||The partition size in sectors minus 1|
Windows doesn't appear to care if the "Hidden sectors" value is completely wrong (because I originally moved them around without updating it) or if the "Total sectors" is slightly larger than the previous size or the partition.