That said, unfortunately AVIF is not a substitute for JPEG XL...
1. AVIF has an order of magnitude slower saving / encoding speed vs JPEG XL.
2. AVIF in "lossless" mode tends to be bigger than PNG- and it isn't truly lossless, just best effort (based on the AV1 video format).
3. JPEG XL supports orders of magnitude higher resolution, bit depth, and is an actual replacement for lossless PNG.