In most cases, exporting AVIF and JPEG XL with corresponding settings produces files of fairly similar size. There's some variance as expected, some images compress a bit better with one format than another.
But certain raw files inexplicably compress very, very poorly with JXL. Here's a sample DNG file that exhibits the problem. https://drive.google.com/file/d/1Cs7TiY7LeA3CGUVCAzqKUl9pLSK6ek7X/view?usp=sharing
It seems common to DNGs produced by the AI denoising function or HDR merge tool, but that is not universal (I've found raws from the same camera that can be enhanced or made into HDR stacks and still compress normally on export)
The settings in the attached screenshot barely compress it at all from the original DNG! Despite said DNG containing over double the amount of pixels, and ostensibly less compression. The AVIF version with the same resolution and quality setting is over 80% smaller than either one. Again, on most images switching to AVIF at the same resolution and quality setting tends to result in fairly similar file sizes, not a 80-90% size reduction. Something about the attached DNG does not seem to be compressing properly on export.
[moved from bugs to discussions according to the community rules - Mod.]