Please remove the swapsize setting from TrueNAS WebGUI under System-> Advanced and force it back to zero. Swap should not be placed on TrueNAS data disks.
Long explanation: FreeNAS has always had a default of 2GB of swap space for every data disk, unless changed in the WebGUI under System -> Advanced. TrueNAS however, has never had this setting, and it was always set to zero.
The reason that TrueNAS has always been set to zero is that a disk that is failing with swap being used (which normally shouldn't happen, but does for some builds due to bugs in the software) will cause swap to be used, and if the disk is failing, the node will crash/failover. The other node will then have the same issue, even if ZFS kicks the disk out of the zpool because the swap isn't part of the zpool.
These choices were deliberate design considerations from years ago and are still valid today.
For the customer in question, because of the 2GB of space used for the swap that wasn't used 6 months ago, his spares will always be 2GB too small to do a disk replacement, so when his disk was failing ZFS failed a TON of times to replace the disks because they were "too small". However without the swap space being set aside, everything worked fine.
I personally verified that the replacement disk was the exact same number of sectors and bytes, and I was able to manually create the partition table without the 2GB partition for swap, and the resilver worked as expected.
Feel free to reach out to me if any of this is confusing.
Debug attached of customer's system for review.