What version of ImageMagick are you running?
I was previously running 6.9 via the Ubuntu apt repository (i.e. apt install imagemagick) and had the same issue.
I uninstalled it and got the latest AppImage from here:
https://imagemagick.org/script/download.php#linux and made it executable with chmod a+x magick and then moved it to the usr/bin folder so I can run magick anywhere.
The main difference is that your commands will look like magick convert ... instead of convert ... and also the AVIF issue is resolved :)
EDIT: it seems the actual MIME type resulting is an image/png rather than image/avif. Compiling ImageMagick with heic delegation manually seems like it should work.
I am not sure if it is intended behaviour for the AppImage, it seems like compiling manually may be the only way for now.