It seems like recent tifffile versions lead to to_tiff not writing images with the correct dimension.
A reproducible example is added by extending the unittest to check for the correct image dimensions:
https://github.com/votti/xtiff/blob/799fe2fa5f6337030c63fdb5064f59bea6e7ddc0/tests/test_tiff.py#L25-L26
This failfs for tifffile-2024.9.20 but works for tifffile-2023.4.12.
Likely this causes the issue reported here: BodenmillerGroup/ImcSegmentationPipeline#144 (comment)
A workaround would be to explicitly pin the tifffile version